From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9ca52bcca2cd9843,start X-Google-Attributes: gidfee84,public From: millerb@pt9534.ped.pto.ford.com (Bryan Miller) Subject: How to get around the arg length in cp and ls Date: 1995/05/26 Message-ID: <3q5dh0$oia@pt9201.ped.pto.ford.com>#1/1 X-Deja-AN: 103354609 organization: Ford Motor Co., Powertrain Electronics cc: millerb@acm.org reply-to: millerb@ACM.org newsgroups: comp.unix.osf.osf1 I'm trying to copy files from a remote NFS mounted dir to another using cp /*.* . and it fails because there are to many files to expand the command out. I then attempted something like: -------------------------------------------------- ls /eee1/millerb_cc/cms/$LIB/*.* > $HOME/.temp.list while read filename; do cp $filename . rm $filename done < $HOME/.temp.list rm $HOME/.temp.list -------------------------------------------------- Now, of course, ls is failing due to arg length too long: import[37]: /usr/ucb/ls: arg list too long Any clever workarounds anyone? -- ---------------------------------------------------------- Bryan Miller | Powertrain Electronics | Control Systems Software| "Nil Sine Numine" millerb@ped.ford.com |