Find only files that changed Yesterday

Thread Tools Search this Thread
# 1  
Find only files that changed Yesterday

Hi ,

I know that find / -type f -mtime -1 will show all modified files that changed 24hrs preceeding the time i run the command. This will include list of files that changed today.

How do i find only files that changed yesterday staring from 00:00hrs to 23:59?


Last edited by radoulov; 07-04-2012 at 04:26 AM.. Reason: code tags
# 2  
Try this...

find . -mtime 1
# 3  
There may be other ways but you could use this. Touch 2 reference files with modification times as follows:

touch -t 201207022359.59 refstart
touch -t 201207040000.00 refend

and then use:

find . -type f -newer refstart \! -newer refend \! -name refend

This will show all the files modified on 3rd July, 2012. You could modify the time-stamps to suit your needs. If you have GNU date, then you could do it dynamically too.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Science: Computers
Difficulty: Easy
In most programming languages, the operator ++ is equivalent to the statement "+= 1".
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Dig and concatenate all files yesterday then save it to another directory

I dont want to use for loop since it is using a lot of resources especially to a thousand files. Wanting to have a while? or something will find files that has been modifed or created yesteraday. View it. And search for soemthing and save it to a certain folder. for i in `find ./ -mtime... (3 Replies)
Discussion started by: invinzin21
3 Replies

2. Web Development

When VPS IP is changed which web files to edit?

Hello, please when an VPS IP is changed which files on VPS i need to edit? I mean basic apache, named files, which needs to be edited? so far i listen its /var/named and domain zone file which contains old ip.. (2 Replies)
Discussion started by: postcd
2 Replies

3. Shell Programming and Scripting

Script to zip the files of yesterday

Hi I've the following requirement, where i need to zip the yesterday files every day . Yesterday's Files touch AB_XYZA_20130930183017.log touch AB_DY_XYZA_20130930183017.log touch AB_GZU_20130930183017.log touch AB_XYZA_20130930180023.log touch AB_DY_XYZA_20130930180023.log touch... (1 Reply)
Discussion started by: smile689
1 Replies

4. Shell Programming and Scripting

How to get the files which has modified date as yesterday and before?

Hi All, Can you please help me to get only the files which has the modified date as yesterday and before? Thanks in advance! Regards, Velava.S (4 Replies)
Discussion started by: velava
4 Replies

5. UNIX for Dummies Questions & Answers

How to find out who changed the file permission in unix

Can any one tell me is there any command to find out who changed the permission of a file Or is there any log file so that i can find out who has changed the permission of a file? Thanks in Advance:) (7 Replies)
Discussion started by: Uttamnsd
7 Replies

6. Solaris

Find why CPU utlization WAS high yesterday

I want to investigate why CPU utilization was high yesterday on my solaris 10 machine. I have been reported this problem but how can I investigate why CPU utilization went high at that time? :confused: (4 Replies)
Discussion started by: kashif_islam
4 Replies

7. UNIX for Dummies Questions & Answers

Find recently changed files

Hi, Can you guys tell me how do i find the most recently changed files, say an hour before, few hours before, a day before etc.... Thanks!!!! (3 Replies)
Discussion started by: raghu_shekar
3 Replies

8. Shell Programming and Scripting

compare files in two directories and output changed files to third directory

I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together. I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
Discussion started by: bkeep
4 Replies

9. Shell Programming and Scripting

Trying to Copy Files Changed Recently

I have been toying around with a script that will copy all files altered in a development directory over to a testing directory and have been trying to construct the command to meet my needs. Basically I am using find in a directory to see what files have changed over the past 24 hours. Then if... (4 Replies)
Discussion started by: scotbuff
4 Replies

10. AIX

way to copy only changed files

Hello, we are going through a restructoring of file systems and will need to copy the contents of one file system to another box, then a few days later copy it again. Is there a way on the second copy to only copy files that have changed? Thanks in advance (3 Replies)
Discussion started by: zuessh
3 Replies

Featured Tech Videos