Operating System - Linux
1752523 Members
5049 Online
108788 Solutions
New Discussion

Re: /usr/bin/find: Argument list too long error

 
SOLVED
Go to solution
d4n13l
New Member

Re: /usr/bin/find: Argument list too long error

Executei a linha abaixo e solucionou o problema:

find ./ -mindepth 1 -maxdepth 1 -name 'clilog.*' -type f -mtime +$1 -delete

Espero ter ajudado outros usuários!

Dennis Handly
Acclaimed Contributor

Re: /usr/bin/find: Argument list too long error

> I used the suggested syntax, but it still returns the error:

Not sure how you could get that error since you don't have any "*".

 

> find ./ -mindepth 1 -maxdepth 1 -name 'clilog.*' -type f -mtime +$1 -delete

-delete doesn't exist on HP-UX find(1).  You have to use: ... -exec rm -rf {} +