How to fix /bin/mv: Argument list too long error

If you are trying to move large number of files such as more than 50000 files using the command mv, you will get the error given below.
[root@server /]# mv * /path/to/move
“/bin/mv: Argument list too long”
In such cases, you can use the command given below to avoid this error ,

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

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Reply