Basic file archiving and compression on linux
·1 min
-
Archiving a file
$ tar -cvf filename.tar foldername/location `-c` create `-v` verbos output `-f` set a filename/filelocation
-
Compressing a file
a. To compress a file:$ gzip filename.tar
b. Show the file:
$ ls
-
Extracting a compressed file
To unzip and extract a file:
$ tar -xzvf filename.tar.gz