Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
In Perl:
system("touch","logfile.xxx"); This works and sets the
modification date and time to the current date/time.
However when I add parameters:
system("touch","-m","0515173398","logfile.xxx");
to specify the modification date and the date/time, I get a
message in the error.log. The message reads:
touch: cannot change times on logfile.xxx
How can I get this command to work with the parameters?
Any suggestions/help would be much appreciatiated. Thanks
Don.
PS. My ultimate goal is to use variables as in:
system("touch","-m","$datetime","$filename");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Changing file modification date.
by tye (Sage) on Jan 09, 2002 at 01:44 UTC | |
|
Re: Changing file modification date.
by belg4mit (Prior) on Jan 09, 2002 at 00:46 UTC | |
|
Re: Changing file modification date.
by belg4mit (Prior) on Jan 09, 2002 at 01:17 UTC | |
|
Re: Changing file modification date.
by metadoktor (Hermit) on Jan 09, 2002 at 01:42 UTC | |
|
Re: Changing file modification date.
by grep (Monsignor) on Jan 09, 2002 at 00:51 UTC |