I was deleting files by using rm on the linux server. There is a maximum number of files that can be passed as arguments to rm. So it does not allow you remove the files with 'rm' command.
Using rm to delete files is the easiest way adopted by us (linux users). rm is generally used with ease on a daily basis. So what you can do when the simple rm command does not work.
There were around 72K files were generated in a folder which I wanted to delete this morning. So I went to that directory and tried to remove all the files starting with "Count*".
root # rm Count*
/bin/rm: Argument list too long.
No way. The irritating error message appeared.
Not sure what the maximum number of arguments for rm command, may be its 1024 arguments only.
The workaround is simple: Use find to pipe all the matching files to rm, one at a time.
root # find . -name 'Count*' | xargs rm
And this can remove as many files as you want. This work really great!!