tar

Using tar

Some basic usage examples of tar.

Archive a set of files:

tar -cvf tarfile.tar /var/log/syslog /var/log/messages

Archive and compress (gzip) a set of files:

tar -cvzf file.tar.gz /var/log/syslog /var/log/messages

Archive and compress (bzip2) a set of files:

tar -cvjf file.tar.bz2 /var/log/syslog /var/log/messages

Extract a tar file:

tar -xvf file.tar
tar -xvzf file.tar.gz
tar -xvjf file.tar.bz2

Display the content of a tar file:

tar -tvf file.tar
tar -tvzf file.tar.gz
tar -tvjf file.tar.bz2

Technology:

Subscribe to RSS - tar

Recent Updates

  • 1 year 1 month ago
  • 1 year 1 month ago
  • 1 year 1 month ago
    php 8.x
  • 1 year 1 month ago
    10.6.7
  • 1 year 1 month ago
    Drop Centos 5/6 stuff