Red Hat Bugzilla – Bug 142687
previously included patch for touch options "backward"/"forward" got dropped
Last modified: 2007-11-30 17:10:56 EST
Description of problem:
Previously (perhaps only in fileutils, perhaps during coreutils times
as well), there was a patch included which gave "touch" special
options to set the date of a file back or forwards by a certain
amount of seconds.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. touch --help | grep -E "\-(B|F)"
-B SEC, --backward=SEC date back SEC seconds
-F SEC, --forward=SEC date forward SEC seconds
I thought this patch was also available as a bugzilla attachment, but
I can't find it. It was definitely originally from one of RedHat's
SRC RPMs. Either fileutils or even ported to coreutils, as I said.
I'll attach the original and an updated version of the patch an beg
you to reinclude it. It is very practical, e.g. if you borked
something by having a wrong BIOS date.
I actually recommend you to submit this upstream. :) I have my doubts
about the diff being given as int, but guess it's okay for a start. :
Created attachment 108410 [details]
original patch to add differential time (forward/backward) options to "touch"
This is as close to the patch originally provided by RedHat as it can be. This
is for reference, it doesn't apply to current coreutils. New patch will follow
Created attachment 108411 [details]
patch to add the same options to "touch" in coreutils
This patch actually applies against coreutils-5.2.1. I had to ommit some
sections due to code change, but it still perfectly "works for me".
Dropped intentionally. Use --date="+n seconds"/--date="-n seconds" instead.
Ah, thanks, I get the point!
"Relative items in date strings" was the info section I should have looked for.
Mea culpa and sorry for wasting your time,