Script to change all the file's dates with condition ... ?
I really need your help :D
Our fileserver (linux) had a wrong system date (+1 year) so now all the file file's dates are in the future.
I'm trying to do a script but my unix knowledge is very limited :)
Could you help please ?
- loop in all the /data filesystem
-- check if the current file's date is above june 2008
---- if yes, change is to 01.01.2008
Do you have any idea :D ?
You can use the touch command along with the find command to accomplish what you want (I believe).
Something like the following:
Notice that this works only with modification times. In particular, changing access times to something different from the present is not reliable. If you absolutely must have this functionality, you must remount the partition with the noatime option.
Wow :) THANKS YOU. I'll try it.
BIG Thanks osor !
It's works perfectly ! :) Amazing ;)
|All times are GMT -5. The time now is 10:17 PM.|