/bin/rm: How to Resolve Argument List Too Long Error

The Argument list too long error is usually a lot of files when trying to delete the file with the rm -rf command.
Solving the problem is simple.
You can perform the deletion using the command below. First, enter the folder.
Step 1:
find -name "*" -print | xargs rm -rf
command. This command will delete all the data in your folder without asking you.
In general, the result of the error received;
bash: / bin / rm: Argument list too long
Step 2: If step 1 above does not work, try Step 2.
Description:
Sometimes when we try to delete the large numbers of audit files, we get the error “/bin/rm: Argument list too long“.
Solution :
Run the below command using your audit home location:
find /u01/app/oracle/admin/mydb/adump \( -name "*.aud" -a -type f \) -mtime +3 -print -exec rm -f {} \;
Note: you can use this command for other log files also like trace file(.trc).
