cp: Argument list too long

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: G.D.Thurman
Dato:  
Emne: cp: Argument list too long
On Mon, 9 Dec 2002, Bill Earl wrote:

> cp /mydir/myfiles/*.pdf /newdir/
>

Switching your current working directory to /mydir/myfiles
will prevent the /mydir/myfiles/ from being prefixed to
all the dot-pdf filenames.

$ cd /mydir/myfiles
$ cp *.pdf /newdir

If that doesn't help, then you can use character classes
and multiple 'cp' commands.

For example,

$ cp [a-m]*.pdf /newdir
$ cp [n-z]*.pdf /newdir
$ cp [0-9]*.pdf /newdir
$ cp *.pdf /newdir

G.D.Thurman [CS/CIS Instructor]     
Scottsdale Community College
480.423.6110