LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2003, 04:40 PM   #1
axero
LQ Newbie
 
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Listing Files based on date


Is there a way to list all the files under a directory and it's subdirectories that were changed or modified within a time period?

For example I want to list all the files under the /home directory and it's subdirectories that have been created or modified within the last system boot or within the last 30 days.

Thanks!
 
Old 10-19-2003, 04:56 PM   #2
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
# The 'ls' family (this assumes you use the GNU ls)
alias la='ls -Al' # show hidden files
alias ls='ls -hF --color' # add colors for filetype recognition
alias lx='ls -lXB' # sort by extension
alias lk='ls -lSr' # sort by size
alias lc='ls -lcr' # sort by change time
alias lu='ls -lur' # sort by access time
alias lr='ls -lR' # recursive ls
alias lt='ls -ltr' # sort by date
alias lm='ls -al |more' # pipe through 'more'
alias tree='tree -Csu' # nice alternative to 'ls'

Here are some nice aliases from the Avd-Bash-Scripting-Guide.
If you don't understand 'alias' and your environment just:

ls -lcr

Last edited by micxz; 10-19-2003 at 04:58 PM.
 
Old 10-19-2003, 04:58 PM   #3
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Also you should use man. e.g. "man ls"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to remove old files based on date WindozBytes Linux - General 12 06-04-2012 01:21 AM
Filenames based on the date yilez Linux - Newbie 5 11-19-2005 10:11 PM
Delete files based on date stefaandk Linux - General 3 06-17-2005 02:20 AM
Date-based copy AdmiralThrawn Linux - General 2 02-23-2004 09:03 AM
Script for deleting files based on date MaverickApollo Linux - General 3 02-03-2004 07:54 PM


All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration