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! |
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.
|
Code:
# find /var -mtime +20 -print | xargs ls -l |
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! |
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 :scratch: |
All times are GMT -5. The time now is 06:28 AM. |