ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label mv. Show all posts
Showing posts with label mv. Show all posts

2011/04/25

/bin/mv: Argument list too long

When you are trying to move large number of files such 200000 files. you can use the command

mv  * /path/to/move

If you try the above command, you will be getting the error  "/bin/mv: Argument list too long"


You can use the command given below to avoid this error ,


find /path/to/file -type f | xargs -i mv "{}" /path/to/move


Try this out.. :)