6
1
I am embarrassingly far along in a bash backup script and have missed something major. I know that ext3 filesystems don't track creation date, but copying files within ext3 updates the changed time as seen via stat (which would work). However, when files are copied from one Windows server to another (whose mounts I have via smb/cifs), from my testing, changed time is not updated. I'm using find to do the searching on the cifs shares. Is there really no way to detect when a new file is created over a cifs share from Linux using "find"?
Also, I am very familiar with rsync, and in this circumstance rsync's limitations rule it out as an option. I was thinking I could use rsync for the searching and try to pipe the results to the action (gzip), but I think the subshells would be ridiculous. Could be wrong, of course. Any suggestions would be much appreciated. Can provide more detail, but from my research I don't think it's possible.
What does stat(1) (part of GNU coreutils, most likely installed in package coreutils for whatever distribution you're using) give you for access/change/modify times for a file residing inside the filesystem in question? That might give you some hints at least. – Sami Laine – 2014-01-19T04:32:29.293
Stat
provides access time, modify time, and change time. Copying a file within ext3 updates change time. Windows (NT) has created time, of course, which gets updated when a file is created via a copy. However, from JdeBP's answer below, GNU coretutils such asstat
,ls
, andfind
, have no way to detect or display newly created files on Windows machines over a cifs share. Thanks for your comment. – kiwisan – 2014-01-19T18:28:40.230