Link to home
Start Free TrialLog in
Avatar of Williams225
Williams225

asked on

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
Avatar of roemelboemel
roemelboemel

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

use a for ... do ... done loop to act on the directory where there is plenty of files.
Avatar of Williams225

ASKER

@viralypatel: how do I use a for....do...done loop to act on the directory?? (i am a beginner)
SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
for i in /dir_in_question/20051008/*
do
  rm $i

Open in new window

"-1" after "ls" is "minus one", not "minus ell"
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial