How to build a tar from a list of files from STDIN

For example, if you want to take the last 7 most recent .txt files and build a tar out of it, do the following:

ls -t *txt | head -n 7 | tar -cf allfiles.tar -T -
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Facebook Twitter Email

Leave a Reply