how to delete 4 day file and folder using bash script in solaris

find /home/bash/logs/ -type d -name "logs*" -mtime 0 -exec rm -rv {} \;
find /home/bash/fcubs/ -name 'logs*' -mtime 4 -daystart -delete 

This is for Oracle Linux i need for solaris thanks in advance

Upvotes: -2

Views: 298

Answers (1)

Romeo Ninov
Romeo Ninov

Reputation: 7225

Try the second command w/o -daystart and -delete

find /home/bash/fcubs/ -name "logs*" -mtime 4 -exec rm -f {} \;

First should exec w/o problem in Solaris

Upvotes: 0

Related Questions