rm * Argument list too long

To delete all files in the current directory, you run the extremely dangerous

**rm * **


**rm -rf ***

to recursively remove all files and directories.

However, the command has a 128K buffer limitation in the Linux Kernel. As a workaround you can pipe each file to rm like so:

**find . -name '*' | xargs rm**

See this article for details.

Posted: 24 November 2008

comments powered by Disqus