Help finding files with shell script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

Anyone know an easy way of finding files in a directory that have been
created within 24 hours but are not being written to.

The only way I can think of doing this is as follows

eg (Not sure of my syntax yet as this is just theoretical)
crond to run at 00:01
find /myth/recordings/ -maxdepth 1 -name '*' -mtime -1|grep
".mpg"|grep -v ".png" > file1
find /myth/recordings/ -maxdepth 1 -name '*' -atime -5|grep
".mpg"|grep -v ".png" > file2
then somehow remove files2 from files1 list and do a for i in `cat file1`;do etc

There must be a better way of doing this?


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux