Error "ksh: /usr/bin/mv: 0403-027 The parameter list is too long." on AIX

HelloI am getting the error

ksh: /usr/bin/mv: 0403-027 The parameter list is too long.

Open in new window


when trying to move some files on AIX
Williams225System AdministatorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

roemelboemelCommented:
Are you using a wildcard for the source parameter?
The mv command gets to many parameters (filenames) which I guess is coming from the expansion done from the shell.
try using a find/xargs/mv combo like this

find /your/source/pattern* |xargs mv -t /your/destination/directory

viralypatelCommented:
use a for ... do ... done loop to act on the directory where there is plenty of files.
Williams225System AdministatorAuthor Commented:
@viralypatel: how do I use a for....do...done loop to act on the directory?? (i am a beginner)
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

woolmilkporcCommented:
ls -1 myfile* | xargs -I{} mv {} /path/to/target
viralypatelCommented:
for i in /dir_in_question/20051008/*
do
  rm $i

Open in new window

woolmilkporcCommented:
"-1" after "ls" is "minus one", not "minus ell"
viralypatelCommented:
for i in /dir_in_question/20051008/*
do
  rm $i
done

Open in new window



replace "rm" with move command. and change the directory according to your source

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.