- 3,129 hits
Place for playing with commands…
ODOC:Note: A “.tar” file is not a compressed files, it is a collection of files within a single file uncompressed. If the file is a .tar.gz (“tarball”) or “.tgz” file it is a collection of files that is compressed. If you are looking to compress a file you would create the tar file then gzip the file.
Creating a tar file:
praveen@praveen-desktop:~$tar -cvwf file.tar myfile.txt
In this example the system would create a tar named file.tar in the directory you currently are in.
praveen@praveen-desktop:~$tar -cvwf file.tar *.txt
It would compress all txt files in the current directory.