I'm looking for a pattern in files using find, then I only want the first ten I find and tar those.
find /var/log/file | xargs grep "pattern" | head -n10 | tar -czvf tarfile.tgz
I have also tried to
tar. This too results in errors. What am I doing wrong?
Here is what I see from the first command:
tar: Cowardly refusing to create an empty archive Try `tar --help' or `tar --usage' for more information.