date with find cmd


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting date with find cmd
# 1  
Old 02-11-2009
date with find cmd

Hi
for today i have 10 files, in that i need search some values how can i write a find cmd with
perticular date
thanks
SAIC
# 2  
Old 02-11-2009
Code:
find . -m1 -exec <command> {} \;

will find files in current directory last modified less than 1 day ago and submit each name in turn as a parameter to <command>

HTH

Jerry
# 3  
Old 02-11-2009
Try this:

Code:
grep -i "expression" `find . -mtime 1`

# 4  
Old 02-11-2009
find <DIR_NAME> -exec grep "SEARCH_PATTERN" '{}' \; -print
# 5  
Old 02-12-2009
find <DIR_NAME> -m1 -exec grep "SEARCH_PATTERN" '{}' \; -print
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Find cmd and sym links

Hi. Can somebody tell me if there's a way of creating a symbolic link from a directory on one filesystem to that on another that will allow a find command that doesn't use the -L param to locate a particular file under that new 'linked' dir. With a normal sym link the find command on that... (6 Replies)
Discussion started by: user052009
6 Replies

2. UNIX for Dummies Questions & Answers

Help with the find cmd

Hello, I'm having a trouble with the find cmd. I would like to find all the java versions on my systems. I have solaris 9 & 10 RHEL and SUSIE. java -version doesn't give all the versions on the server. So I am trying to use the find command to find them all find / -name java I would... (7 Replies)
Discussion started by: bitlord
7 Replies

3. Shell Programming and Scripting

Nested find cmd

Hi gurus, greetings. Objective: find in a path directories that are named Logs. In each found Logs dir search for files with .log extension and remove -atime +6. (Note for test/example, rm and -atime is not used). Issue: If I execute the script without redirecting output to a file, on... (8 Replies)
Discussion started by: rsheikh
8 Replies

4. UNIX for Dummies Questions & Answers

How to Identify date of file backed up used FBACKUP cmd?

Dear UNIX Experts, I'm a newbie. My name is Budi. I need some help from any body in this forum. How do we identify the backed up date of file in the Back up tape ? I did the back up using FBACKUP cmd. I tried to googling it, but unfortunately no aimed solution that I got. :confused: I've... (0 Replies)
Discussion started by: Bhoed
0 Replies

5. AIX

Yesterday's date without changing anything and in one cmd line ?

I have seen references in the forum about getting yesterday's date but it is either by changing something in the system (date, time zone, ...) or with more then one line of script cmds. How can I get yesterday's date without changing anything in the system and in one single command line ? (4 Replies)
Discussion started by: Browser_ice
4 Replies

6. Shell Programming and Scripting

How to link lsof and find cmd?

Hi All, My target is to find the biggest files opened by any process and from that i have to find process id and the corresponding file also to avoid file system being hung-up. Finding the process id: is to kill the process Finding the biggest file: is to remove the file To get the process... (0 Replies)
Discussion started by: Arunprasad
0 Replies

7. Shell Programming and Scripting

want date in format eg:Nov 12 using date cmd

I want date in format eg: using cmd date then it show Dec 05 (2 Replies)
Discussion started by: RahulJoshi
2 Replies

8. Shell Programming and Scripting

date cmd

Hi all, date +%d/%m/%Y This is the command that displays current date(18/09/2008). Now, is there a way that would give me yesterdays date..? or tomorrows date n things like that? (1 Reply)
Discussion started by: vijay_0209
1 Replies

9. Shell Programming and Scripting

using find cmd to find certain files

i have a list of files below: rwxrwxrwx 1 pipe pipe 180 Mar 4 22:47 del_0n_Date -rwxrwxrwx 1 pipe pipe 472 Mar 4 22:58 mail_Check -rw-r--r-- 1 pipe pipe 92 Mar 4 22:58 minfo.txt -rwxrwxrwx 1 pipe pipe 609 Mar 5 05:12... (6 Replies)
Discussion started by: ali560045
6 Replies

10. Shell Programming and Scripting

Error with Date cmd

Hi all, When i execute the below command its giving an error "date: Bad conversion" date \"+DATE %m/%d/%Y HEURE %H:%M:%S\" (4 Replies)
Discussion started by: krishna_gnv
4 Replies
Login or Register to Ask a Question