linux make tar gz file from terminal selecting files code example Example: how to tar linux tar -zcvf file.tar.gz /path/to/dir/