Linux tips and tricks for faster and easier administration Linux servers and applications! Troubleshooting and solutions!

Wednesday, 13 May 2015

SOLVED Argument list too long bash issue for rm, ls, mv, cp

In case you have folder with many files and you want to list, move, copy or delete them you will see this message#:rm -rf files*-bash: /bin/rm: Argument list too long#:ls |wc -l120407

Why this is happening? To say it in a simple way, you have to many files. Why this is a problem? Linux see that you have to many files and he is not able to do things (in are case rm, cp, ls or mv operations) because there is to many files. This have nothing do to with file size. Just with numbers of files. How to solved this?