Sponsored Content
Top Forums Shell Programming and Scripting to find all files created a day back Post 302353324 by mac4rfree on Tuesday 15th of September 2009 06:19:25 AM
Old 09-15-2009
Hi methyl.
The folder i am looking into is havin aournd 5000 files..

Code:
{oracle:/u01/app/oracle/product/9.2.0.6.0_64/rdbms/audit}$ ls -ltr
total 10018
-rw-r-----   1 oracle   sysdbora    1186 Jan 14  2006 ora_6736.aud
-rw-r-----   1 oracle   sysdbora     781 Jan 14  2006 ora_6793.aud
-rw-r-----   1 oracle   sysdbora    1186 Jan 14  2006 ora_6830.aud
-rw-r-----   1 oracle   sysdbora     644 Jan 14  2006 ora_6879.aud
-rw-r-----   1 oracle   sysdbora     637 Jan 14  2006 ora_8716.aud
-rw-r-----   1 oracle   sysdbora     918 Jan 14  2006 ora_8827.aud
-rw-r-----   1 oracle   sysdbora     644 Jan 14  2006 ora_8858.aud
-rw-r-----   1 oracle   sysdbora     637 Jan 14  2006 ora_8859.aud
-rw-r-----   1 oracle   sysdbora     637 Jan 14  2006 ora_8917.aud
-rw-r-----   1 oracle   sysdbora    1190 Jan 14  2006 ora_11449.aud
-rw-r-----   1 oracle   sysdbora     646 Jan 14  2006 ora_11486.aud
-rw-r-----   1 oracle   sysdbora     639 Jan 14  2006 ora_11487.aud
-rw-r-----   1 oracle   sysdbora     776 Jan 14  2006 ora_12055.aud
-rw-r-----   1 oracle   sysdbora     920 Jan 14  2006 ora_12382.aud
-rw-r-----   1 oracle   sysdbora     646 Jan 14  2006 ora_12450.aud
-rw-r-----   1 oracle   sysdbora     639 Jan 14  2006 ora_12451.aud
-rw-r-----   1 oracle   sysdbora     639 Jan 14  2006 ora_12982.aud
{oracle:/u01/app/oracle/product/9.2.0.6.0_64/rdbms/audit}$ find . -type f -name '*.aud' -mtime -1
{oracle:/u01/app/oracle/product/9.2.0.6.0_64/rdbms/audit}$

 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Can I back up all the files I work with each day using tar?

Can I back up all the files I work with each day using tar? (2 Replies)
Discussion started by: jo calamine
2 Replies

2. UNIX for Dummies Questions & Answers

Find all files created by a specified user in a directory and its subdirectories

Is there a command or shell script which can be used for Finding all files created by a specified userid in a directory and its subdirectories. Say, I want to find all such files in directory /abc as well as in all the subdirectories such as /abc/xyz or /abc/xyz/pqr aqnd so on which was created... (5 Replies)
Discussion started by: abhilashnair
5 Replies

3. Shell Programming and Scripting

find files created within 30 minutes

find . -name *.txt -mmin -30 This is working in Redhat but not in Solaris.. What is the equivalent option in Solaris? (1 Reply)
Discussion started by: tene
1 Replies

4. UNIX for Dummies Questions & Answers

How to find files created some days before?

HI, I have 2 questions. 1> Is there any code to see files that created some day or some time before in a directory??? 2> how or where i will find the last exit status of a process?? thanks (6 Replies)
Discussion started by: jyotidas
6 Replies

5. Shell Programming and Scripting

Find files of particular day

Hi, I need to find all files of particular day lets say for 2nd august in below. -rw-r--r-- 1 skl eusdc 8168 Aug 5 19:31 aabc123.txt -rw-r--r-- 1 skl eusdc 4251 Aug 5 19:31 aabc124.txt -rw-r--r-- 1 skl eusdc 4252 Aug 6 19:31 aabc125.txt -rw-r--r-- ... (15 Replies)
Discussion started by: sachinkl
15 Replies

6. Shell Programming and Scripting

what is the find to command to find the files created last 30 days

what is the find to command to find the files created last 30 days (5 Replies)
Discussion started by: rajkumar_g
5 Replies

7. Shell Programming and Scripting

Find the sum of files created 5 days before

Hi, I want to find the sum of all the files created 5 days ago and store it in a variable. (os is HP-UX) can this be extracted from ls -l Is there any other way of getting the sum of all the files created (4 Replies)
Discussion started by: bang_dba
4 Replies

8. Shell Programming and Scripting

How to find files created today in a particular directory?

Dear All, I want a Hp Ux command to find out the files created today in a particular directory or mountpoint. Kindly help. Thanks Bhaskar (10 Replies)
Discussion started by: sudiptabhaskar
10 Replies

9. Shell Programming and Scripting

Listing the file name and no of records in each files for the files created on a specific day

Hi, I want to display the file names and the record count for the files in the 2nd column for the files created today. i have written the below command which is listing the file names. but while piping the above command to the wc -l command its not working for me. ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies

10. Shell Programming and Scripting

How to find the files created within one hour in Solaris?

Hi Gurus, I want to find the file created within one hour in solaris. I have tried below command, but it is no lucky. $find . -mtime -1/24, -name "abc*" above command give me the file name which created two hours ago find . -cmin -60, -name "abc*" above command I got error as... (4 Replies)
Discussion started by: ken6503
4 Replies
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)
All times are GMT -4. The time now is 11:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy