The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 12-07-2007
denn denn is offline
Registered User
 

Join Date: Jul 2007
Posts: 93
a few issues:

you're asking user to input a date, you then read that date, however after that, you don't reference this input anywhere. shouldn't you be using this for your touch command, instead of: touch -t 00000000 /tmp/timestamp ?

The touch command you have doesn't work, at least here on any of my versions of UNIX.

touch require not only a date, but hrs/mins, so you'll need to reformat input from the read: from the man page:
format is YYMMDDhhmm

touch -t 8907140000 bastille
/tmp $ ll bastille
-rw-r--r-- 1 root sys 0 Jul 14 1989 bastille
Reply With Quote