06-15-2005
processing files an hour before
hi
I guess you can use "find" command with -newer or -mtime option for getting those files. refer man pages for detailes about this command.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've looked at several of the previous posts and can't seem to find any that pertain to my problem, I'd appreciate some help if possible.
I have a directory with numerous logs of various names all named by heading and date ie.
dog.20050529.log
dog.20050530.log
... (2 Replies)
Discussion started by: gillr
2 Replies
2. Shell Programming and Scripting
hi
Is there a way to sort files in the order they were created ,and move them to another directory one by one ,oldest being the first to be moved.
Thanks
Arif (4 Replies)
Discussion started by: mab_arif16
4 Replies
3. UNIX for Dummies Questions & Answers
Hi there,
I'm using terminal on mac and using the ls -l command to list all the files in a directory. However, I only want to display the date and time stamp of each file rather than permissions, owner, group etc...
Is this possible?
Many thanks in advance
Dave (2 Replies)
Discussion started by: davewg
2 Replies
4. UNIX for Dummies Questions & Answers
Hello Mates! I'm kinda new to unix and need to a solve a problem.
Input: date
Situation: With the given date I need to find a list of all such files starting from a given path that were modified after the given date.
I experimented with the "find" with "-newer" but did not quite get it... (4 Replies)
Discussion started by: rkka
4 Replies
5. Shell Programming and Scripting
I have a file called MasterRECEIVEFranScript. I need to change its modified time to Sep 20 09:34 2008
For this i have tried a command ,but no success
touch -m -t 1222079885 MasterRECEIVEFranScript
-------------------------------------------------------------
Plz help me in this ?
... (6 Replies)
Discussion started by: ali560045
6 Replies
6. Shell Programming and Scripting
Hi All,
I want to find the time diffrence between currnt time and "abc.txt" file create time.
I have solve that but if the abc.txt file created last month then is there any process to find the difftent?
Exp:
Create time of abc.txt is "Apr 14 06:48"
and currect date is "May 17 23:47".... (1 Reply)
Discussion started by: priyankak
1 Replies
7. Shell Programming and Scripting
Hi,
Appli.log files contain the below data which updates continuously
================================================== ===============
Tuple Created OrderEntry|66|39.0|ADML.L|16.89|GBP||GFD|000002889 41ORLO1|GB00B02J6398|80|XLON|UHORIZON|null|2011-05-09... (11 Replies)
Discussion started by: pspriyanka
11 Replies
8. Shell Programming and Scripting
Hi Folks,
Need a clarification on files with date and time stamp.
Here is my requirement. There is a file created everyday with the following format "file.txt.YYYYMMDDHHMMSS".
Now i need to check for this file and if it is available then i need to do some task to the file.
I tried... (6 Replies)
Discussion started by: jayadanabalan
6 Replies
9. Shell Programming and Scripting
I am trying to compare identically named files in different directories and replace a file only with a newer version. Is there a way of doing this?
TIA (4 Replies)
Discussion started by: wbport
4 Replies
LEARN ABOUT ULTRIX
crontab
crontab(5) File Formats Manual crontab(5)
Name
crontab - clock daemon table file
Syntax
/usr/lib/crontab
Description
The command executes at specified dates and times according to the instructions in the file. The file consists of lines with six fields
each. The format for a line is as follows:
minute hour day month weekday command
The following list defines each field in the line:
minute (0-59) The exact minute that the command sequence executes.
hour (0-23) The hour of the day that the command sequence executes.
day (1-31) The day of the month that the command sequence executes.
month (1-12) The month of the year that the command sequence executes.
weekday (1-7) The day of the week that the command sequence executes. Monday = 1, Tuesday = 2, and so forth.
command The complete command sequence variable that is to be executed. Note that the command string must conform to Bourne shell
syntax.
The first five integer fields may be specified as follows:
o A single number in the specified range
o Two numbers separated by a minus, meaning a range inclusive
o A list of numbers separated by commas, meaning any of the numbers
o An asterisk meaning all legal values
The sixth field is a string that is executed by the shell at the specified times. A percent sign (%) in this field is translated to a new-
line character. Only the first line of the command field, up to a percent sign (%) or end of line, is executed by the shell. The other
lines are made available to the command as standard input.
Examples
The following example is part of a file:
# periodic things
0,15,30,45 * * * * (echo '^M' `date`; echo '') >/dev/console
0,15,30,45 * * * * /usr/lib/atrun
# daily stuff
5 4 * * * sh /usr/adm/newsyslog
15 4 * * * ( cd /usr/preserve; find . -mtime +7 -a -exec rm -f {} ; )
20 4 * * * find /usr/msgs -mtime +21 -a ! -perm 444 -a ! -name bounds
-a -exec rm -f {} ;
# NOTE: The above line is wrapped.
# local cleanups
30 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name df-exec rm {} ;
35 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name tf-exec rm {} ;
40 4 * * * find /usr/spool/rwho -type f -mtime +21 -exec rm {} ;
#
# redirecting error output
0 17 * * 1,3,5 /bin/tar -cv /usr/sysads/smith > /dev/console 2>&1
#
Files
See Also
sh(1), cron(8)
Guide to System Environment Setup
crontab(5)