Unix/Linux Go Back    

UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

Get the list of files for a given date

UNIX for Dummies Questions & Answers


 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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
    #2  
Old Unix and Linux 07-11-2008
joeyg's Unix or Linux Image
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 25 August 2016, 1:08 PM EDT
Location: Within two miles of a Dunkin donuts.
Posts: 2,408
Thanks: 98
Thanked 177 Times in 163 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.
    #3  
Old Unix and Linux 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 Unix and Linux 07-16-2008
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 8 June 2016, 9:58 PM EDT
Posts: 6,402
Thanks: 288
Thanked 676 Times in 645 Posts
This is the unix way to do it:

http://www.unix.com/filesystems-disk...ated-date.html
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 01:10 AM.