Retaining timestamp of a directory.
Hallo Folks,
Quite often when we do an operation in a directory the timestamp of directory changes. Say we did vi any new file to perfomed any write operation in that directory? Is there anyway I can retain timestamp? so I can save my arse for audit ? :) ---------- Post added 03-13-12 at 01:45 AM ---------- For a file it is quite easy, I normally do cp -pavf file file_backup and then again cp -apvf file_backup file what about directory?? |
Code:
touch -r some_directory /tmp/time.somedir # Save the current timestamp |
I think an auditor would want to see the timestamp changed/correct ....
|
@rknichols
Many thanks for that, yep it works beautifully. @chrism01 I do agree and understand but sometimes you need a changed timestamp to original in case if your scripts runs on "flag" mode and is depenedent on timestamp. |
Well, unless you have another way of recording each change to the dir, I still say the auditor is not going to be happy ...
YMMV, depending on the auditor ... |
@chrism01
I want to fool the auditors! :) Nothing nasty but I believe in ideas and not hierarchy! for some crappy reason big fat cat siting in our organization is a compelete headless b@st@srd ! |
Ummm ... you're entitled to your view(s), but if a) your organisation feels the need to
have audits, and b) the corporate policy for those is accepted you're in breach of some rule or other with that approach of yours. Unless there's something you NEED to hide an audit item can be a) explained, or b) amended to not re-occur if it doesn't sit well with the companies processes. c) might be that you're doing nastys after all ... Anyway, trying to weasel out of something in your employment agreement puts you in breach of LQs rules, too. Closing this ... Cheers, Tink |
All times are GMT -5. The time now is 02:25 AM. |