i am using HP-UX OS......
delete logs older than 60 days
find -mtime +60 | grep -i '.*log' | xargs rm
-mtime is nt available in HP-UX, pls tell me other option ?
i am using HP-UX OS......
delete logs older than 60 days
find -mtime +60 | grep -i '.*log' | xargs rm
-mtime is nt available in HP-UX, pls tell me other option ?
I very much doubt that. You are missing a pathname
find path-spec -mtime .....
-mtime is indeed available in HP-UX. By the way no need to use grep and pipe it to xargs rm, just do:-
find . -name '*.log' -mtime +60 -exec rm -f {} \;