Bug 53564 - Is there a way to increment the time for n seconds?
Summary: Is there a way to increment the time for n seconds?
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
(Show other bugs)
Version: 7.1
Hardware: All Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2001-09-11 18:18 UTC by hjl
Modified: 2007-04-18 16:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-27 15:56:47 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch adding -F and -B (5.40 KB, patch)
2001-09-27 14:18 UTC, Bernhard Rosenkraenzer
no flags Details | Diff

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

# 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

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.)

Gru_ an bero,

Note You need to log in before you can comment on or make changes to this bug.