02-10-2018
Please be aware that the results you get from above are depending on the point of time you run it, as the "n*24 hours ago" period starts exactly then. Run at 14:33h with -mtime +2, a file modified two days ago at 14:30h will show up, and one from 14:35h will not. Run at 14:35h, both files will show up.
Does your find version offer the -daystart option? If not, you might need to adapt the -mmin test...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear All:
I want to build a shell that delete files created two or more days ago ... I think it could be built using a special command with ls or grep, I'd apreciate any help from you guys
I have a lot of log files from november, december, january and this tool will help me a lot
The files... (3 Replies)
Discussion started by: josecollantes
3 Replies
2. Shell Programming and Scripting
Please tell me how can I wirte a function to return the date 7 days ago by using calendar command? :confused: (2 Replies)
Discussion started by: LAY
2 Replies
3. UNIX for Dummies Questions & Answers
How can I get difference date between today and 15 days ago and all filename is was created before 15 days ago?
It has to be korn shell script.
Thanks. (1 Reply)
Discussion started by: YoungBlood
1 Replies
4. Shell Programming and Scripting
How can I get difference date between today and 15 days ago and all filename is was created before 15 days ago?
It has to be korn shell script.
Thanks. (2 Replies)
Discussion started by: YoungBlood
2 Replies
5. Shell Programming and Scripting
i need a script that can tell me the date 2 days ago or 3 days ago.
please help (7 Replies)
Discussion started by: tomjones
7 Replies
6. Shell Programming and Scripting
How could I using the following example, change it to show 2 days ago within the same time frame 0600 AM to 0600 AM
let foo=`date "+(1%H-106)*60+1%M-100"` bar=foo+1440
find . -mmin +$foo -mmin -$bar | tr -s '/','-' '^' | cut -f2,3 -d"^" | tr -s '^' ' ' |
Please use code tags (7 Replies)
Discussion started by: freddie999
7 Replies
7. Shell Programming and Scripting
i want to find unix file created how many days ago? (4 Replies)
Discussion started by: utoptas
4 Replies
8. UNIX for Advanced & Expert Users
Hi,
the following gives today
$(date '+%d%m%y')
For example 210111 for today (21 of january 2011).
How can I have n days ego ? For example 160111 for 5 days ego ?
thank you. (3 Replies)
Discussion started by: big123456
3 Replies
9. Shell Programming and Scripting
Hi,
I need to grep for a string "Color Yellow" in all log files dated 5 days back until today's date .
So, as today is 20 Dec i need to find in all logs from 16th dec to 20 dec.
Also, i need ls -ltre output for the files that have the "Collor Yellow" string.
Below is my OS:
... (1 Reply)
Discussion started by: mohtashims
1 Replies
10. Shell Programming and Scripting
Hi all,
I have been researching to obtain SSL certification expiry for most of our webistes. For some cases, some hosts where not directly accessible so i finally got a solution working with curl using my proxy. This lists the expiry date which i'm finally looking for.
# curl --proxy... (4 Replies)
Discussion started by: nms
4 Replies
LEARN ABOUT DEBIAN
app::prove::state
App::Prove::State(3pm) User Contributed Perl Documentation App::Prove::State(3pm)
NAME
App::Prove::State - State storage for the "prove" command.
VERSION
Version 3.25
DESCRIPTION
The "prove" command supports a "--state" option that instructs it to store persistent state across runs. This module implements that state
and the operations that may be performed on it.
SYNOPSIS
# Re-run failed tests
$ prove --state=fail,save -rbv
METHODS
Class Methods
"new"
Accepts a hashref with the following key/value pairs:
o "store"
The filename of the data store holding the data that App::Prove::State reads.
o "extensions" (optional)
The test name extensions. Defaults to ".t".
o "result_class" (optional)
The name of the "result_class". Defaults to "App::Prove::State::Result".
"result_class"
Getter/setter for the name of the class used for tracking test results. This class should either subclass from "App::Prove::State::Result"
or provide an identical interface.
"extensions"
Get or set the list of extensions that files must have in order to be considered tests. Defaults to ['.t'].
"results"
Get the results of the last test run. Returns a "result_class()" instance.
"commit"
Save the test results. Should be called after all tests have run.
Instance Methods
"apply_switch"
$self->apply_switch('failed,save');
Apply a list of switch options to the state, updating the internal object state as a result. Nothing is returned.
Diagnostics:
- "Illegal state option: %s"
"last"
Run in the same order as last time
"failed"
Run only the failed tests from last time
"passed"
Run only the passed tests from last time
"all"
Run all tests in normal order
"hot"
Run the tests that most recently failed first
"todo"
Run the tests ordered by number of todos.
"slow"
Run the tests in slowest to fastest order.
"fast"
Run test tests in fastest to slowest order.
"new"
Run the tests in newest to oldest order.
"old"
Run the tests in oldest to newest order.
"save"
Save the state on exit.
"get_tests"
Given a list of args get the names of tests that should run
"observe_test"
Store the results of a test.
"save"
Write the state to a file.
"load"
Load the state from a file
perl v5.14.2 2012-06-05 App::Prove::State(3pm)