LinuxQuestions.org
Register a domain and help support LQ
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 03-27-2006, 10:15 AM   #1
aarulan
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
directory listings


How would i go about listing all files in the /tmp directory that have been created or modified since system boot time?
And a listing of all the files under the /var directory and its sub directories, that were created or modified within the last 7 days?

I tried working with the boot time in the bootlog, but not to sure how to go about it.

Again i would appreciate any help with these questions, Thanks!
 
Old 03-27-2006, 11:36 AM   #2
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 275

Rep: Reputation: 32
Suggestions

I googled "date range linux ls" and came back with a few hits that should get you pointed in the right direction. Most suggestions have pointed to piping to awk or using find . -mtime. I'm sure one of those could be modified to suit your purposes.
 
Old 03-27-2006, 12:12 PM   #3
ckoniecny
Member
 
Registered: Oct 2005
Posts: 162

Rep: Reputation: 30
Code:
# find /var -mtime +20 -print  | xargs ls -l
This command will search /var for all files modified in the last 20 days. If you want to search what files were created in the last 20 days, just ctime instead of mtime in the find command.
 
Old 03-27-2006, 05:23 PM   #4
aarulan
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
do you know where i can find the boot time? I tried looking in the boot log, but on one of my systems the file it empty, and on another its got the time, but i cant isolate it? is there a better location i should be looking in for the time stamp?

Thanks!
 
Old 03-27-2006, 08:49 PM   #5
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 275

Rep: Reputation: 32
Roll Your Own

How about putting a line in your /etc/bootmisc.sh to write a boot time token that you can use for that purpose?

I'm sure that's not even necessary, there are tons of "up time" counters so it must be getting the boot time from somewhere - but...

Idunno
 
  


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
vsftpd on Fedora 4 - empty/incomplete directory listings REdward Linux - Networking 0 08-19-2005 05:56 PM
Directory/File Listings AndeAnderson Debian 7 02-24-2005 01:59 AM
Stop directory listings in Apache lothario Linux - Software 2 05-23-2004 10:17 AM
Apache directory listings Boffy Linux - Networking 8 04-30-2004 05:47 AM
SLOW everything is SLOW - Even directory listings! astroboy5714 Linux - Networking 1 01-25-2004 09:31 PM


All times are GMT -5. The time now is 08:12 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration