|
I had a problem using the tar command this morning, and rather than figure out what in the world I was doing wrong with find, xargs, and tar, I decided to use pax instead. It worked great at creating an archive file that tar could use, so instead of fighting with the find/xargs/tar three-headed monster, pax bailed me out.
Here's an example of what was failing on my monster backup:
find . -type f -name "*html" | xargs tar cvf jw-htmlfiles.tar -
And here's an example of what worked using pax:
find . -type f -name "*html" | pax -w -f jw-htmlfiles.tar
Of course I'm probably doing something pretty obviously wrong in the first example, but that's not the point -- I was able to use pax and solve the problem in less than a minute and get on with life.
|