[Novalug] All files in a directory...

John Holland jbholland at gmail.com
Thu Dec 28 10:42:57 EST 2006


# from within  the directory with the files

ls | xargs cat | cat > out

#contents will be in 'out'



On 12/28/06, Duane C. Mallory <malloryd at themallorys.us> wrote:
>
> I would like to take all text files in a directory and append the data
> in them into one file with a different name. I was hoping I could cheat
> and use "find" to round them up and then "cat" to append them into
> another file; unfortunately all this does is append the file names into
> the new file - not the data in the files.
>
> Does any one have a down and dirty way of doing this?
>
> Thanks,
>
> DCM
> _______________________________________________
> Novalug mailing list
> Novalug at calypso.tux.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://calypso.tux.org/pipermail/novalug/attachments/20061228/a82bbddb/attachment.html 


More information about the Novalug mailing list