rm and the 'Argument list too long'
you wanted to delete all the files in a directory that begins with the word 'temp' bala bala
[prabhat@my-site]# rm temp*
bash: /bin/rm: Argument list too long
ERROR!
This happens when you are trying to delete too many files in a directory at the same time - it seems rm has limits ....
To solve the problem:
Use 'find' to pipe all the matching files to 'rm', one at a time.
[prabhat@my-site]# find . -name 'temp*' | xargs rm
or
[prabhat@my-site]# find . -name 'temp*' - print0 | xargs -0 rm -f
[prabhat@my-site]# rm temp*
bash: /bin/rm: Argument list too long
ERROR!
This happens when you are trying to delete too many files in a directory at the same time - it seems rm has limits ....
To solve the problem:
Use 'find' to pipe all the matching files to 'rm', one at a time.
[prabhat@my-site]# find . -name 'temp*' | xargs rm
or
[prabhat@my-site]# find . -name 'temp*' - print0 | xargs -0 rm -f
Comments
aur ye word verification kab hata rahe ho