Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Finding and sorting files in massive file directory

by frozenwithjoy (Priest)
on Jan 21, 2013 at 01:04 UTC ( #1014366=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Finding and sorting files in massive file directory
in thread Finding and sorting files in massive file directory

If you put something like this in a while (there are files that start w/ a) loop, you should get around the issue of too many arguments. (Be sure to set increment=1 before the loop).
mkdir dir_a.$increment mv `ls a* | head -n1000` dir_a.$increment/ let increment++
Comment on Re^3: Finding and sorting files in massive file directory
Select or Download Code
Replies are listed 'Best First'.
Re^4: Finding and sorting files in massive file directory
by choroba (Chancellor) on Jan 21, 2013 at 02:04 UTC
    The problem is you will get "too many arguments" from ls a* already.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014366]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2016-05-01 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (441 votes). Check out past polls.