Archive Tools Linux (tar, star, gzip, cpio, bzip2, zip)

First for the example please add directory and file as follows :

mkdir -p /tmp/diarycoding-dir/subdir1
mkdir -p /tmp/diarycoding-dir/subdir2
mkdir -p /tmp/diarycoding-dir/subdir3
mkdir -p /tmp/diaryextract-dir
touch /tmp/test-dir/subdir1/diaryfile1.txt
touch /tmp/test-dir/subdir1/diaryfile2.txt
touch /tmp/test-dir/subdir2/diaryfile3.txt
touch /tmp/test-dir/subdir2/diaryfile4.txt
touch /tmp/test-dir/subdir3/diaryfile5.txt
touch /tmp/test-dir/subdir3/diaryfile6.txt

the assume extract “diaryextract-dir” as directory empty.

Continue reading