tar all files and subdirectories code example Example: tar all files and subdirectories tar -zcvf my.tar.gz path-of-directory/