• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1817
  • Last Modified:

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
0
cismoney
Asked:
cismoney
2 Solutions
 
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
 
cismoneyAuthor Commented:
@viralypatel: how do I use a for....do...done loop to act on the directory?? (i am a beginner)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now