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 -
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 -