Saturday, 30 January 2016

-bash: /bin/rm: Argument list too long

if you run: rm -r and get below error:

-bash: /bin/rm: Argument list too long


you can use this:

find  -name "*" -exec rm {}  \;
if your file names has spaces. then you can try :

rm -r ./

https://www.linux.com/community/blogs/133-general-linux/760530-linux-shell-tip-remove-files-with-names-that-contains-spaces-and-special-characters-such-as-/

No comments:

Post a comment