Get the list of files for a given date | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Get the list of files for a given date

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-11-2008
vanagreg vanagreg is offline
Registered User
 
Join Date: Nov 2007
Last Activity: 22 November 2010, 10:06 AM EST
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Get the list of files for a given date

Hi,

the command "ls -l" gives the list of files of a directory with details such as date and size.
Is there a way to restrict this list to see only files created on a given date? Suppose I want to list only the files created today, what is the command to type?

Thanks
Sponsored Links
    #2  
Old 07-11-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 26 August 2014, 2:14 PM EDT
Location: Out running a Marathon.
Posts: 2,322
Thanks: 71
Thanked 153 Times in 142 Posts
Hammer & Screwdriver some different ways to do this

take a look at the find command; often used when you want to do something next - like delete all temp log files from yesterday.

this can give you a listing of files for a specific day

Code:
>stat -c "%y|%n" * | grep "^2008-07-02"

this will sort your listing

Code:
>ls -ltr

take a look at the man pages for each of these to find more about spcific detailed usage.
Sponsored Links
    #3  
Old 07-12-2008
crystal_pup crystal_pup is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 25 February 2014, 5:03 AM EST
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
How abt this?

ls -ltr | grep '12 Jul'
    #4  
Old 07-16-2008
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 672 Times in 642 Posts
This is the unix way to do it:

http://www.unix.com/filesystems-disk...ated-date.html
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
List files with Date Range and Zip it nokiak810 Shell Programming and Scripting 2 08-01-2010 01:47 AM
List the particular date files only kingganesh04 UNIX for Advanced & Expert Users 1 12-19-2008 07:36 AM
List files with a specific date... B14speedfreak Solaris 4 06-15-2006 08:59 AM
list of files in date order Jeannine UNIX for Dummies Questions & Answers 2 08-15-2005 02:19 PM
list files modded since a certain date pasher UNIX for Dummies Questions & Answers 7 10-06-2004 11:11 AM



All times are GMT -4. The time now is 02:44 AM.