redhat linux 打包和壓縮命令

vim /etc/ssh/sshd_config ##編輯允許登陸的配置文件

systemctl rstart sshd ##重起sshd服務

PermitRootLogin no ##不允許root用戶被遠程登陸

Allowusers linux westos ##允許那個用戶可以被訪問


壓縮命令  壓縮參數 壓縮後文件名 待壓縮的文件名(路徑)

tar -cf etc.tar /etc/ ##創建etc.tar壓縮文件,原文件爲/etc/ create file

tar -xf etc.tar ##解壓縮etc.tar文件 

tar -rf etc.tar file ##把file文件添加到etc.tar壓縮文件中 readd file 

tar -f etc.tar --get file ##僅僅把壓縮文件中的file文件解壓縮出來

tar f etc.tar --delete file ##僅僅刪掉壓縮文件中的file文件


du -sh /etc/ ##查看文件大小

gzip etc.tar ##壓縮

gunzip etc.tar.gz ##解壓縮

bzip2 etc.tar##壓縮

bunzip2 etc.tar.bz2##解壓縮

xz etc.ta##壓縮r

unxz etc.tar.xz##解壓縮

zip -r etc.tar.zip etc.tar ##壓縮

unzip etc.tar.zip##解壓縮


rsync -rp /mnt [email protected]:/mnt/

cp -p

scp -r /etc/ [email protected]:/mnt/

ctl + 左右鍵 ##跳到另一個單詞首部


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章