-2
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

  • 1
    Note that on Unix, BSD--and Linux, too--they are "directories" and not the Windows concept of "folders" which is not the same thing. – Rob Aug 14 '21 at 08:22

1 Answers1

0

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

Romeo Ninov
  • 6,538
  • 1
  • 22
  • 31