Error – /bin/rm: Argument list too long : Linux Error
We in real life, generally use the rm command to remove the files and folders. Have you ever got this Error – /bin/rm: Argument list too long ! rm command to delete files in linux
Today, We will see the alternate method to delete such a large number of files. Learn More What are the Basic Linux Commands and How to use
When trying to delete the files of a folder ( using # rm
) with lots of content in it , you might get this error :
/bin/rm : Argument list too long
The traditional # rm command will not be able to delete too many files in a directory.
To get around this, use the command given below. Please note that the below command will delete all the files in the current directory in which you are logged into.
# find . -name '*' | xargs rm
Read More: pipe (|) operator in Linux command