Previous in Forum: Dual Boot Issues   Next in Forum: Business Intelligence - Dairy Manufacturing Unit
Close
Close
Close
5 comments
Rate Comments: Nested
Anonymous Poster

Unix Command for Listing Files Modified on a Date

10/21/2010 6:26 AM

hi,

can anyone tell me the unix command for listing the files modified on a particular date.

Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Anonymous Poster
#1

Re: Unix Command for Listing Files Modified on a Date

10/21/2010 11:36 AM
Reply
Guru

Join Date: Feb 2009
Location: Houston, USA
Posts: 946
Good Answers: 244
#2

Re: Unix Command for Listing Files Modified on a Date

10/21/2010 7:24 PM

I hope you are familiar with man page (if you are a unix user, you should). If somebody doesn't know how to use the unix man page and vi editor, I would say he/she is not so familiar with unix. Try the man page for the 'find' command first, you will see lot of information and options regarding file search. Man page is the first thing to see for the unix user for any sort of help. To go the man page, just type: man <command_name> and enter. For example to see the details of 'find' command, type: man find

Hope it is useful to you.

- MS

__________________
"All my technical advices in this forum must be consulted with and approved by a local registered professional engineer before implementation" - Mohammed Samad (Linkedin Profile: http://www.linkedin.com/in/msamad)
Reply
Guru
Engineering Fields - Control Engineering - Time to take control United States - Member - New Member Engineering Fields - Systems Engineering - New Member Engineering Fields - Mechanical Engineering - New Member

Join Date: Apr 2009
Location: Tampa, Florida, USA
Posts: 2129
Good Answers: 87
#3

Re: Unix Command for Listing Files Modified on a Date

10/22/2010 4:21 PM

I believe the command would be:

ls -lt

this should list the files in long format sorted by time (which includes the date).

Here's a link to common UNIX commands.

__________________
J B
Reply
Guru
Engineering Fields - Control Engineering - Time to take control United States - Member - New Member Engineering Fields - Systems Engineering - New Member Engineering Fields - Mechanical Engineering - New Member

Join Date: Apr 2009
Location: Tampa, Florida, USA
Posts: 2129
Good Answers: 87
#4

Re: Unix Command for Listing Files Modified on a Date

10/22/2010 4:56 PM

I just realized that my recommendation may be problematic if a large number of files exist.

One way would be to use the ls -lt |m and pipe the output to a file, then search the file for the desired date.

Or you could use:

find . -type f |xargs stat -c%n%y |grep "2007-09-17"

to find a file with a date of Sept 17th 2007.

__________________
J B
Reply
Guru
Engineering Fields - Control Engineering - Time to take control United States - Member - New Member Engineering Fields - Systems Engineering - New Member Engineering Fields - Mechanical Engineering - New Member

Join Date: Apr 2009
Location: Tampa, Florida, USA
Posts: 2129
Good Answers: 87
#5

Re: Unix Command for Listing Files Modified on a Date

10/25/2010 10:36 AM

Also this should work:

ls -l |grep "date"

__________________
J B
Reply Score 1 for Good Answer
Reply to Forum Thread 5 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

Anonymous Poster (1); JBTardis (3); msamad (1)

Previous in Forum: Dual Boot Issues   Next in Forum: Business Intelligence - Dairy Manufacturing Unit

Advertisement