Bug 53564

Summary: Is there a way to increment the time for n seconds?
Product: [Retired] Red Hat Linux Reporter: hjl
Component: fileutilsAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: moritz
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-09-27 15:56:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch adding -F and -B none

Description hjl 2001-09-11 18:18:32 UTC
Is there a way to increment the time for n seconds? I am thinking something
like

# touch -F n foo

which will increment the time by n seconds and

# touch -B n foo

which will decrement the time by n seconds.

Comment 1 Bernhard Rosenkraenzer 2001-09-18 09:30:17 UTC
Use touch -t or touch --time=foo for now.
Adding -F and -B wouldn't be much of a problem, but it would be nonstandard 
extensions (or are they supported anywhere else?)


Comment 2 hjl 2001-09-18 15:15:31 UTC
What I want is to make a file, bar, a few seconds newer than
foo. It is used for make. I'd like to do

# touch -t foo bar
# touch -F 1 bar

so that bar is 1 second newer than foo. I don't  want to bar to
to have the current time since foo might have been updated
between it was checked out and bar was generated.

Comment 3 Bernhard Rosenkraenzer 2001-09-27 14:18:35 UTC
Created attachment 32718 [details]
Patch adding -F and -B

Comment 4 Bernhard Rosenkraenzer 2001-09-27 15:56:40 UTC
Works slightly different though:

To achieve your example, simply

touch -r foo -F 1 bar

I've added this patch in 4.1-6


Comment 5 Moritz Barsnick 2002-08-01 15:50:21 UTC
Hi,

this is a nifty feature. Is there any particular reason for
dropping it in recent fileutils packages, or was it just by
accident when branching back to older releases?

(I think I have an updated patch available.)

Thanks,
Gru_ an bero,
Moritz