search by modified date


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting search by modified date
# 1  
Old 01-04-2007
search by modified date

Hello,
How can i search for all the files in a particular directory which are not updated from past 5 days.

Thanks,
Sateesh
# 2  
Old 01-04-2007
find

use the following option

find / -mtime -5 -print
# 3  
Old 01-04-2007
Thanks for your reply. how can i get these file in to an array so that i can zip them.
# 4  
Old 01-04-2007
u can send the stream into tar using the pipe

find / -mtime -5 -print | tar cvf test.tar
# 5  
Old 06-24-2008
use '/' in find only if u want to search from Root dir

to find files in a particular dir. use this command -

find . -type f -mtime +5 -print
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Arrange file by modified date

Hi, Am performing a find based on filename and result can contain multiple files being found Let's say my find command is find /Archive -f -name 12345.pdf and result of find command is /Archive/Folder A/12345.pdf /Archive/Folder B/12345.pdf please note white space in folder names I... (2 Replies)
Discussion started by: gigagigosu
2 Replies

2. Shell Programming and Scripting

Script to copy creation date over top of modified date?

Can someone draw up a script that for every file, folder and subfolder and files that will copy the creation date over top of the modified date?? I know how to touch every file recursively, but no idea how to read a files creation date then use that to touch the modification date of that file,... (3 Replies)
Discussion started by: toysareforboys
3 Replies

3. UNIX for Advanced & Expert Users

Need to search for keywords within files modified at a certain time

I have a huge list of files in an Unix directory (around 10000 files). I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40 Can someone let me know what would be the fastest way... (10 Replies)
Discussion started by: virtual123
10 Replies

4. Shell Programming and Scripting

search last modified file and process it

Hello, trying to build a shell script that - searches in defined location for similar files (eg. containing pattern in file name) - Identifies last modified - stores name in variable for processing Thanks a lot (4 Replies)
Discussion started by: alice07
4 Replies

5. Shell Programming and Scripting

How can i search a file which has been created or modified in last five minutes

Hi Can some one please help me How can i search a file which has been created or modified in last five minutes I have used the command find . -mmin -5 and it does not work i get an error -mmin is bad option Please help Much regards Tarun (2 Replies)
Discussion started by: tarundeepdhawan
2 Replies

6. Shell Programming and Scripting

search and add same line modified in iptables

I have in iptables file the following: -A RUN -p tcp -m tcp -s ipaddress1 --dport xxx --syn -j ACCEPT -A RUN -p tcp -m tcp -s ipaddress2 --dport xxx --syn -j ACCEPT And I want to add for each ipaddress1 and ipaddress2 another IP address Like this: -A RUN -p tcp -m tcp -s ipaddress1... (2 Replies)
Discussion started by: Mansor
2 Replies

7. UNIX for Dummies Questions & Answers

Last Modified Date for subfolders

Sorry for the basic question, but I have a feeling that my developers are circumventing our change control process, and I want to be able to easily keep track of the last modified date of sub-folders of the production folder. Basically, we have this major folder PROD, and then each application... (1 Reply)
Discussion started by: saint01
1 Replies

8. Shell Programming and Scripting

greping certain modified date

i have a k shell script that grep less than certain modified date ------------------------------------------------- #!/bin/ksh for i in * do day=`ls -ltr | grep $i | tr -s " " | cut -d " " -f6-7 | awk 'substr($0,7,4)substr($0,1,5)substr($0,11)<"Feb 1"' ` echo $day done... (2 Replies)
Discussion started by: ali560045
2 Replies

9. Shell Programming and Scripting

Last Modified Date

Hello, I'm on a practical training and i have to change a shell script which print out a HTML-File with all Printers (and features example: IP, Mac etc.) they have in the factory. The Features of the Printers are on each separate file. i mean every printer have an own file with it features. ... (12 Replies)
Discussion started by: cengiz
12 Replies

10. UNIX for Dummies Questions & Answers

How do I get the last modified date of a file?

I am trying to load a group of files and their last dates modified into a text file that will in turn be used with SQL*Loader to load these files into Oracle. I am using a *.ksh script. I am getting the name of the file in by using the following: for file_ext in 'cat loaddir.ext'; do find... (2 Replies)
Discussion started by: akpopa
2 Replies
Login or Register to Ask a Question