Linux Command Reference

Create a tar archive with bzip2 compression

Command Description:

Compresses the directories 'foo' and 'bar', found in the current directory, using bzip2 compression. The output archive is './foo.tar.bz2'.

 

$ tar cjvf ./foo.tar.bz2 ./foo ./bar
Permissions: $
Flags:
'c': Create Archive, 'j': Use bzip2 compression, 'v': Verbose, 'f': Archive file
Command Output:

./foo/
./foo/c.c
./foo/b.c
./foo/a.c
./foo/bar/
./foo/foo/
./bar/
./bar/z.c
./bar/y.c
./bar/x.c

Tags: tar