Archive files (LINUX)

The tar command combines multiple files into a single large file. It is separate from the commpression tool. Additionally, tar is able to read and write to devices such as tape devices.

tar options filename

-c Create a new archive
-t View the contents of and archive
-x Extract the contents of an archive
-f Specify the name of the file in which archive is located
-v Provide descriptions during operations
-j Filter the archive through the bzip2 compression utility
-z Filter the archive through the gzip compression utility

Exampe:
Create an archive called arch.tar containing all the files in the folder called arch

tar -cf arch.tar arch

No comments:

Recent Posts