Tag: tar

Incremental Backup with tar

Make a incremental backup of directory ‘/home/binnyva’ tar -Puf backup.tar /home/binnyva

Archive all files with a given extension

Find all files with ‘.log’ extention and make an bzip archive find /var/log -name ‘*.log’ | tar cv –files-from=- |…

Decompress Bzip2 File

Decompress a compressed tar archive in bzip2 tar -xvfj archive.tar.bz2tar -xvfj archive.tar.bz2

Create a Bzip2 File

create a tarball compressed into bzip2 tar -cvfj archive.tar.bz2 dir

Extract to Given Folder

extract a tarball into / tmp tar -xvf archive.tar -C /tmp

Archive Contents

Show contents of an archive tar -tf archive.tar

Create Compressed Tarball

Create a compressed tarball tar -czf archive.tar file_name

Read Tarballed Text File

How to read a big text file that is tarballed – without extracting the whole thing… bzcat enwiki-20070802-pages-articles.xml.bz2 | head…