Hi,
a public share (samba, OpenMediaVault) is used for temporary file sharing.
My intention is to keep this share clearly arranged and remove all files older than 30 days.
Therefore daily script is running:
Code:
find '/mountpoint/' -mtime +29 -type f -delete
For newly created files it is okay, but the problem is, that if a file was copied from another host to this share, the modification date doesn't change. The file keeps the old date and during the next scheduled run the script deletes this file.
Any ideas how I can fix this issue? Is there an option that samba always sets a new modtime while copying or does another solution exists?
thx