[TriLUG] create tar file from stdin

Ben Coughenour benc at alumni.psu.edu
Wed Feb 3 15:36:02 EST 2010


Do you mean create a tar file that contains all the files who's names 
are listed on stdin?  If so xargs is your friend. 

ls | xargs tar -cf myfile.tar

Matthew Opoka wrote:
> Anyone know of a way to read stdin with tar and create a tar file?
>
> Regards,
>
> Matthew
>
>
>       
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
>   




More information about the TriLUG mailing list