Filemanagement
Fraser Campbell
fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org
Sun Mar 7 20:36:40 UTC 2004
On Sunday 07 March 2004 15:08, G. Matthew Rice wrote:
> Also, ls/xargs won't help here. If 'cat *.pgn' creates too long of a
> command line, so will 'ls *.pgn'. Variations around find(1) would work,
> though. Something like:
>
> find . -name '*.pgn' | xargs cat >target.file
If I'm going to run into problems with to many files I usually handle it this
way:
TARGET=dest_dir/big_file.pgn
find source_dir/ -name '*.pgn' | while read file; do
cat "$file" > $TARGET
done
Not saying it's the best way but at least it handles spaces in filenames
properly (something Windows users seem to love).
--
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org> http://www.wehave.net/
Georgetown, Ontario, Canada Debian GNU/Linux
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list