The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
get latest file inquirer Shell Programming and Scripting 4 04-02-2009 11:15 AM
Getting latest file from ftp arunavlp UNIX for Dummies Questions & Answers 3 02-08-2008 10:19 AM
Creating an updated file dbfree Shell Programming and Scripting 4 09-30-2005 03:23 AM
want to cat the latest log file created vkandati UNIX for Dummies Questions & Answers 1 03-08-2005 06:13 PM
How to Grab the latest file n9ninchd UNIX for Dummies Questions & Answers 1 05-10-2001 04:31 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-06-2008
asadlone asadlone is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 44
checking out latest updated file

hi,
i was wondering if there is a way to find out which file is updated the most recent time in the entire file system.... most probably this would be refering to some LOG file, but i wanna find a way which file was that...
some script should work or what?
can anybody help me out on that.
for example to list the last 20 most updated files. starting from root onwards

thanks indeed
  #2 (permalink)  
Old 05-06-2008
namishtiwari namishtiwari is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2007
Location: Bangalore
Posts: 377
Quote:
Originally Posted by asadlone View Post
hi,
i was wondering if there is a way to find out which file is updated the most recent time in the entire file system.... most probably this would be refering to some LOG file, but i wanna find a way which file was that...
some script should work or what?
can anybody help me out on that.
for example to list the last 20 most updated files. starting from root onwards

thanks indeed
Code:
ls -ltr | tail -20
  #3 (permalink)  
Old 05-08-2008
asadlone asadlone is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 44
but that will give updated files in the current working directory...
i need to see in whole filesystem starting from root and onwards

i wanna check which files are the most updated ones ....not in a particular directory but overall in the entire filesystem which also shows its path

thanks
  #4 (permalink)  
Old 05-08-2008
krishmaths krishmaths is offline
Registered User
  
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 191
find with mtime option may help.

A Sample:
Code:
find / -mtime -5 -exec ls -ltr {} \;
Change the root dir you want to search and the mtime parameter according to your need.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0