[TriLUG] create tar file from stdin

Kevin Hunter hunteke at earlham.edu
Wed Feb 3 20:34:23 EST 2010


At 7:51pm -0500 Wed, 03 Feb 2010, Carl Schaefer wrote:
>> ls | xargs tar -cf myfile.tar
> 
> xargs can invoke the specified program multiple times, so if the file
> list overflows one command line the resulting tar file will not contain
> all the files.

Ah good call!  I'd forgotten about that aspect of xargs.

Thanks Carl,

Kevin



More information about the TriLUG mailing list