tar [Command]

Command tar

tar – Creates archive files or extract files from archives.


tar [options] file_or_directory


-c: creates a new archive.
-d: compares the files from the archive files from the current directory.
-r: adds the files in the archive.
-t: displays the contents of the archive.
-x: extracts files from the archive.
-C: directory extracts the files in the specified directory.
-f: file read the archive from the specified file.
-L n: determines the size of the tape to n kilobytes.
-N: date archive only files newer than specified date.
-T: file archives or extract files with names listed in the file file.
-v: verbose.
-z: compresses or decompresses the archive with gzip.
-j: compresses or decompresses the archive through bzip2.


The tar command creates an archive file, or extract files from existing archives.


Tar Multiple Files and Folders With One Command

tar czf tarfile.tar.gz --files-from /folder/subfolder/files_list 

files_list below:


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.