![]() |
changing the date of a file on a webserver
I got 10000's html files hosted that where from 2004 to 2006 etc
is there a script or programe i can use to change the 10000's html files date from 2005/2006 to 2008 thanks i found a lot of file date changers on google but they only work with windows |
Quote:
|
Quote:
but i dont know how to write a php script like that |
Quote:
PHP Code:
|
you can use the system command touch to change the timestamp on a file as well. no need to use all the resources to open/close a file.
|
Yeah, touch is way more efficient and is designed to do exactly what you want.
|
Quote:
will it change the date on all files? as i just want .html to change |
go to the directory where the files are and run this command (ssh)
Code:
find . -name "*.html" -print0|xargs -0 touchP.S. the php script above changes all files regardless of extension |
Quote:
Quote:
|
thanks guys for the help
i used find . -name "*.html" -print0|xargs -0 touch and it worked great |
Quote:
it took me years to learn windows |
| All times are GMT -7. The time now is 08:55 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123