05-16-2011
The problem with "find -mtime -1", even with -daystart, is that unless it starts on the first second each day, there can be gaps or duplications in the find. For precision, it is better to touch a marker file and find -newer $marker_file, using two markers as I described to bracket either N exact calendar days or one exact batch since last run.
Even then, a file being modified ongoing could be included in multiple days, in different versions, of course.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have task in which I need to pickup a set of files from a directory
depending on the following criteria:
Every month 6 files are expected to arrive at /test.
The files come with date timestamp and the latest file set for the month needs to be used
Suppose this is the set of files that present... (5 Replies)
Discussion started by: w020637
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have some list of directories in the form datemonthyear e.g. 02082009, 03082009 and 04082009 etc.
I need to pick the latest directory from the current working directory.
Outcome:
05082009
This is the output am expecting.
Thanks (6 Replies)
Discussion started by: venkatesht
6 Replies
3. Shell Programming and Scripting
Hi,
I am new to unix and shell scripting,can anybody help me in sctipting a requirement.
my requirement is to get the latest directory the name of the directory will be like CSB.monthdate_time stamp
like CSB.Sep29_11:16 and CSB.Oct01_16:21.
i need to pick the latest directory.
in the... (15 Replies)
Discussion started by: sudhir_83k
15 Replies
4. UNIX for Dummies Questions & Answers
Hi
In my script i am trying to access mainframe server using FTP,
in the server i have filee with the timestamp.I need to get the file with the latest timestamp among them . The server has the below files
/
ftp> cd /outbox
250 CWD command successful
ftp> ls
200 PORT command successful... (4 Replies)
Discussion started by: laxmi131
4 Replies
5. Shell Programming and Scripting
Hi
I have a requirement like below
I need to sort the files based on the timestamp in the file name and run them in sorted order and then archive all the files which are one day old to temp directory
My files looks like this
PGABOLTXML1D_201108121235.xml... (1 Reply)
Discussion started by: saidutta123
1 Replies
6. Shell Programming and Scripting
Hi Friends,
Newbie to shell scripting. Currently i have used the below to sort data based on filenames and datestamp
$ printf '%s\n' *.dat* | sort -t. -k3,4
filename_1.dat.20120430.Z
filename_2.dat.20120430.Z
filename_3.dat.20120430.Z
filename_1.dat.20120501.Z
filename_2.dat.20120501.Z... (1 Reply)
Discussion started by: robertbrown624
1 Replies
7. UNIX for Dummies Questions & Answers
Hi Friends,
Newbie to shell scripting
Currently i have used the below to sort data based on filenames and datestamp
$ printf '%s\n' *.dat* | sort -t. -k3,4
filename_1.dat.20120430.Z
filename_2.dat.20120430.Z
filename_3.dat.20120430.Z
filename_1.dat.20120501.Z
filename_2.dat.20120501.Z... (12 Replies)
Discussion started by: robertbrown624
12 Replies
8. Shell Programming and Scripting
3679 Jul 21 23:59 belk_rpo_error_**po9324892**_07212014.log
0 Jul 22 23:59 belk_rpo_error_**po9324892**_07222014.log
3679 Jul 23 23:59 belk_rpo_error_**po9324892**_07232014.log
22 Jul 22 06:30 belk_rpo_error_**po9324267**_07012014.log
0 Jul 20 05:50... (5 Replies)
Discussion started by: LoneRanger
5 Replies
9. Shell Programming and Scripting
Hi ,
I did the initial search but could not find what I was expecting for.
15606Always_9999999997_20160418.xml
15606Always_9999999998_20160418.xml
15606Always_9999999999_20160418.xml
9819Always_99999999900_20160418.xml
9819Always_99999999911_20160418.xmlAbove is the list of files I... (4 Replies)
Discussion started by: chillblue
4 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have list of files like below with name abcxyz.timestamp. I need a unix command to pick the latest file from the list of below files. Here in this case the lates file is abcxyz.20190304103200. I have used this unix command "ls abcxyz*|tail -1" but i heard that it is not the appropriate... (2 Replies)
Discussion started by: rakeshp
2 Replies
cycle(1) Utils cycle(1)
NAME
cycle - a calendar for women
SYNOPSIS
cycle
DESCRIPTION
Cycle is a calendar program for women. Given a cycle length or statistics for several periods, it can calculate the days until menstrua-
tion, the days of "safe" sex, the fertile period, and the days to ovulations, and define the d.o.b. (date of birth) of a child. It allows
the user to write notes and helps to supervise the reception of hormonal contraceptive tablets.
FEATURES
The program is capable of:
- Calculate of the days of menstruation, based on length of the cycle or on statistics of a period.
- Calculate the "safe" sex days, fertile period and day to ovulations
- Definition of D.O.B . (Date Of Birth) of a child
- Allows to write notes
- Helps to supervise reception of hormonal contraceptive tablets
HOW DOES IT WORK
It uses the calendar method for the definition of fertile days. For this is necessary to determine duration, at least, of last six cycles.
For determine the fertile days it uses this algoritm:
- First day: duration of shortest cycle minus 18
- Last day: duration of longest cycle minus 11
- Ovulation: is considered in the middle of fertile period (Determine the exact day isn't possible with the calendar method)
Date of a birth of the child is counted from the beginning of last menstruation (in obstetrics are accepted 40 weeks). This date is cor-
rected with the duration of a cycle (are subtracted or added same number of days that a cycle differs from 28 days). Is possible check the
results at: http://cir.msk.ru/sroki.shtml (in Russian)
USAGE
It is necessary to mark the beginning of menstruation. This is possible clicking with the right button on the date and chosing "The begin-
ning of a cycle". Similarly the mark can be removed. Using duration of last six cycles, the program will calculate
- Fertile period - green cells
- Ovulation day (the middle fertile period) - brightly green cell
- Beginning of following menstruation - pink cells
Cycle duration is set in options or is calculated an average of last six periods.
To determine prospective date of a birth of the child, it is necessary first day of last cycle to mark in addition as "Pregnancy".
Depending on your purposes, you can display only "Safe" sex days or only fertile days. Information about interesting day can be received
clicking with left button.
Is possible adding a note to any date using corresponding item of the menu. Day with a note are underlined.
It is necessary to note that factor of failures of calendar contraception method is about 10 percent. This method is suitable only for
women with enough regular cycle.
If your doctor has recommended hormonal contraceptive this program will help to supervise their reception. Closely familiarize with the
instruction applied to the chosen preparation. Packing can contain 21 tablet (the circuit of reception 21 day on one tablet, then 7 days
pause) or 28 tablets in this case all tablets are accepted without interruption every day of 28. In the program, is marked only day of
reception of each first tablet of packing.
NOTE: This program is not a reliable contraceptive method. It does neither help to prevent sexual transmision diseases like AIDS. It is
just an electronic means of keeping track of some of your medical data and extract some statistical conclusions from them. You cannot con-
sider this program as a substitute for your gynecologist in any way.
FILES
~/.cycle
This is the directory where cycle stores the data.
AUTHOR
cycle was written by Oleg S. Gints.
This manual page was written for Debian by Miriam Ruiz <little_miry@yahoo.es>.
SEE ALSO
You can find cycle's home page at: http://cycle.sourceforge.net/
More information about calendar method are available at: http://www.mama.ru/gynecolog/STA/st18.htm (in Russian)
Miriam Ruiz 6 April 2005 cycle(1)