[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a bug in "touch"?
From: |
Steve Magee |
Subject: |
a bug in "touch"? |
Date: |
Wed, 28 Jan 2004 17:11:21 -0800 |
I'm running RH v9 and using the touch command
to keep the same date and time on files after a sort.
My method used is:
touch -d "$mon $day $yrtime" filename
Every year in January, I find that I have many
files that have a date in the future. Today I
ran a test on the touch command and found out,
the touch command has a problem/bug.
When issuing the command above and in the
format above, it sets the timestamp a year ahead.
Example: In January, you issue the command above
where $mon = Dec, $day = 31 and $yrtime = 12:30.
These parameter are taken from the ls -la | awk command.
The file...
-rwx------ 1 major daemon 2173 Dec 31 12:30 x
becomes...
-rwx------ 1 major daemon 2173 Dec 31 2004 x
I believe this is a bug in the touch command.
Thank you,
Steve Magee
Air Resources Board
State of California
- a bug in "touch"?,
Steve Magee <=