[Samba-it] mtime o ctime?
Marco Gaiarin
gaio at sv.lnf.it
Fri Oct 20 09:54:01 MDT 2006
> La cosa si perde nella mia povera cabezza, e non ne riesco a ricordare
> la fonte ne il contesto, ma mi pare di aver letto in giro che quando si
> deve andare a vedere la ``data di ultime modifica'' in un file
> condiviso da client windows sia bene guardare ctime e non mtime, perchè
> sostanzialmente le applicazioni windows non fanno altro che creare un
> nuovo file e cancellare il vecchio quando lo modificano, e perchè di
> converso alcune operazioni banali tendono ad influenzare l'mtime.
Non è proprio così, ma ora mi sono ricordato la fonte, ed è la manpage
di tmpreaper:
Additionally, tmpreaper can be instructed to also check the ctime
(inode change time, which is updated e.g. when the file is created or
permissions are changed). This is primarily useful when tmpreaper is
used to clean up directories that are accessible as a Samba share; DOS
(and Windows) PCs preserve the mtime and the atime when copying to a
new file, so that it appears that the newly created file is old.
tmpreaper will remove such files is the atime is beyond the removal
time, even though they were just created. This is avoided by using the
--ctime option.
Anche se nel contesto in cui devo usarlo io credo che sia più
significativo mtime che ctime: a me serve infatti sapere se il file non
è stato modificato da più di X giorni, non quando è stato creato, e il
fatto che windows preservi mtime a questo punto è un bonus.
--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797
More information about the samba-it
mailing list