[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU "touch" : Clearer Help for "-d" option
From: |
Bob Proulx |
Subject: |
Re: GNU "touch" : Clearer Help for "-d" option |
Date: |
Thu, 5 Apr 2001 17:29:25 -0600 |
> When you do "touch.exe --help" , two of the lines output are these:
>
> -d, --date=STRING parse STRING and use it instead of current time
> -t STAMP use MMDDhhmm[[CC]YY][.ss] instead of current time
And we agree there is a lot of output to look through.
> Question 1: Is "STRING" the same as "STAMP" above ?
No. STRING is a more human formatted string. The format
possibilities are very large. See the info manual for complete
details. Here are only a few examples:
date --date="24 September 1972"
date --date="1970-09-17"
date --date="24sep72"
> Question 2: How about an example. Many people struggle with this ?
> For example, should "touch.exe --date=010101012000 " work
The traditional AT&T UNIX used MMDDhhmm which would look like 04051700
for April 5th, 5:00pm. That is part of the standard and compatibility
must be maintained. But that is an unfriendly format. Therefore with
the -d, --date option you can specify the date in any of the more
human formats.
> ... too darn hard, without an example.
And there are so darn many examples that there are too many really.
It can't be fully documented in the usage message. The usage string
is already so long that some users complain that it is way too long
and scrolls off of the page. And sure you can pipe it through a
pager but users that know that don't need the help message in the
first place.
info touch
Then follow the note to the "Date input formats" section.
Good Luck
Bob