how to compress many file in tar using shell script code example Example: how to tar linux tar -zcvf file.tar.gz /path/to/dir/