Argument list too long

There are quite tons of audit files sitting in a mount point filling up space. I try to list the files and count them but end up with the subjected error

[oracle@exdbadm01 adump]$ ls -lrt *.aud|wc -l
-bash: /bin/ls: Argument list too long

I try to find the files with some parameters but still i cannot. This is because

[oracle@exdbadm01 adump]$ find . -name *.aud type -f|wc -l
-bash: /usr/bin/find: Argument list too long

Finally i was able to print the total number files residing in the audit directory

[oracle@exdbadm01 adump]$ find . -name "*.aud" -print|wc -l
74727

Leave a Reply