I’m trying to remove about one billion files located in a single directory under linux with this command:
# rm /test/*.mp3
but execution is fault with this message:
-bash: /bin/rm: Argument list too long
how can i solve this problem?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I frequently use something of the form
This allows each file to be processed in turn, rather than a glob trying to list all the files as arguments to the rm command.