Jump to content

Touch -B


Recommended Posts

man touch

[i give you this link because it's easier than me trying to figure out whether you want to change the access time or the modified time or exactly what timestamp...plus, all the options are layed out there, and I know you're knowledgeable enough to find what you need :P]

 

Obviously, doing man touch in a terminal on your own computer could possibly give you a more relevant man page.

Link to comment
Share on other sites

Come on guys, read what he said! :P

The way I understood it, he doesn't want to set the timestamp to now, he wants to give a parameter so that the timestamp is relative to the current time, ie one hour ago or two days in the future. I've never seen an option to do that but then again I've never looked for it, never needed it. But that option is definitely not in the man page. It is listed here though.

Link to comment
Share on other sites

Apparently they decided it wasn't needed anymore:

http://www.gnu.org/software/coreutils/manu...in-date-strings

 

[ohms@localhost ~]$ date
Fri Sep 28 22:04:48 CDT 2007
[ohms@localhost ~]$ touch --date='-2 hours' somefile
[ohms@localhost ~]$ ls -l somefile
-rw-r--r-- 1 ohms guest 0 Sep 28 20:04 somefile
[ohms@localhost ~]$ date
Fri Sep 28 22:05:52 CDT 2007
[ohms@localhost ~]$ touch --date='-2 hours -5 minutes' somefile2
[ohms@localhost ~]$ ls -l somefile2
-rw-r--r-- 1 ohms guest 0 Sep 28 20:01 somefile2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...