Cmd that used a lot but always forget
Compress or uncompress
# compress
tar cvzf cmprssd.tar.gz cmprssd/
To unpack or extract a tar file, type:
tar -xvf file.tar
REF: tar-extract-linux
To save disk space and bandwidth over the network all files are saved using compression program such as gzip or bzip2. To extract / unpack a .tar.gz (gzip) file, enter (note -z
option):
tar -xzvf file.tar.gz
To extract / unpack a .tar.bz2 (bzip2) file, enter (note -j
option):
tar -xjvf file.tar.bz2
To extract .rar
sudo apt install unrar
unrar x file.rar
chmod(change to user permission)
sudo chmod -R 777 "target_dir_name"
标签:used,forget,tar,always,gz,lot,file,extract
From: https://www.cnblogs.com/wunyje/p/18616959