How do move large number of files ?

Cameron Hutchison lists at
Wed Apr 14 01:06:34 UTC 2010

MirJafar Ali <mirjafarali at> writes:

>I have very huge number of files in one directory that I wish to move to
>some other folder and
>the standard  "mv" just screames

>crash-06:~/DataSet$ mv file*  SFiles
>bash: /bin/mv: Argument list too long

>Can someone suggest what is may be a good solution.  of course picking one
>by one is ruled out.

People have given a wide range of suggestions, but I think the easiest
is to just break down the size of each move and do it a number of times:

$ mv file[a-m]* SFiles
$ mv file[n-z]* SFiles

and if you have any left (those starting with capitals, numbers or other
symbols), you can probably move them in one go with file*. Tailor the
range in brackets to suit the way your files are named.

You can break that down further if any particular move presents the same
problem of the argument list being too long.

More information about the ubuntu-users mailing list