Whereas -c switch of tar command creates an archive, -r is used to append files to a tar files. In the following example, xargs keeps on sending htm files as input to the tar command. These files are appended to htm_files.tar.
find . -name "*.htm" | xargs tar rvf htm_files.tar
Usual way of tar -cvf does not work for the above purpose.
Wednesday, July 19, 2006
Subscribe to:
Post Comments (Atom)
1 comment:
find . -name "*.htm" -exec tar rvf htm_file.tar {} \;
works as well.
Post a Comment