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?
 
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
0
 
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

0
 
viralypatelCommented:
use a for ... do ... done loop to act on the directory where there is plenty of files.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Williams225System AdministatorAuthor Commented:
@viralypatel: how do I use a for....do...done loop to act on the directory?? (i am a beginner)
0
 
woolmilkporcCommented:
ls -1 myfile* | xargs -I{} mv {} /path/to/target
0
 
viralypatelCommented:
for i in /dir_in_question/20051008/*
do
  rm $i

Open in new window

0
 
woolmilkporcCommented:
"-1" after "ls" is "minus one", not "minus ell"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.