Deleting large number of files in linux

You might have often encountered the “Argument list is too long” message when trying to rm -rf large amount of files. This happens often on large servers when trying to clean up the tmp folder. This is because the rm command has a pretty low count of supported parameters (filenames) while the tmp folder can become host to a terribly high number of files (millions in a period of years).