Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--newer-than=SPEC #21

Closed
kszymukowicz opened this issue Jul 6, 2012 · 7 comments
Closed

--newer-than=SPEC #21

kszymukowicz opened this issue Jul 6, 2012 · 7 comments

Comments

@kszymukowicz
Copy link

hi

it would be great if the docs can be updated with information what format should the SPEC in --newer-than=SPEC be.
No info in google on that.

Thanks.

Krystian

@lavv17 lavv17 closed this as completed Jul 6, 2012
@lavv17
Copy link
Owner

lavv17 commented Jul 6, 2012

It is explained just below in the man page: "For option --newer-than you can either specify a file or time specification like that used by at(1) command, e.g. now-7days' orweek ago'. If you specify a file, then modification time of that file will be used."

@kszymukowicz
Copy link
Author

Ahhhh - yes - I am sorry. I missed that paragraph. Thanks.

@tonny-zhang
Copy link

Hi
I did't find any info about SPEC in google also.

now I want use --newer-than=SPEC to download files one months ago,How should I do it?

Thanks

@lavv17
Copy link
Owner

lavv17 commented Sep 26, 2014

It's fairly complex time specifications, extending the POSIX.2 standard. The definition of the time specification can be found in /usr/share/doc/at-3.1.13/timespec

For your task "now-1month" should work.

@hhocker
Copy link

hhocker commented Jun 3, 2015

For those that find this issue later have a look at "AT(1)" online man page:
http://linux.die.net/man/1/at
The "batch" section describes some of the abilities of the time format.

@mjevans
Copy link

mjevans commented Aug 3, 2017

Two years later the manual is still unclear on this point.

'SPEC' should be replaced with a distinct and easy to find meta-name such as AT_SPEC (searching in many case insensitive environments practically highlights the entire document as potential matches).

In one part of the document AT_SPEC can be defined as a reference to the manual page for the at command (actually 'at' isn't installed on the system I want to use lftp on, so this could be unhelpful), but also a couple example formats should be provided.

EG:

2006-01-02T15:04:05 (absolute)
"- 1 days" (relative based on current timestamp)

I don't even know if these two examples are accurate, since the webpage transcription of the manual for the at command is written in an information-dense paragraph style instead of with easy to digest examples or construction rules.

@mlgarchery
Copy link
Contributor

mlgarchery commented Jun 1, 2022

Has anybody ever tried the "If you specify a file, then modification time of that file will be used." part ?
I have seen no example of this usage: mirror remotedir/ localdir/ --newer-than="file.csv" and my attempts failed

Edit:
I made it work. You have to specify an existing file on the LOCAL FOLDER for it to work:
mirror remotedir/ localdir/ --newer-than="localdir/file.csv"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants