The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Splitting input files into multiple files through AWK command arund_01 Shell Programming and Scripting 3 05-13-2008 06:17 AM
Find duplicates from multuple files with 2 diff types of files ricky007 Shell Programming and Scripting 2 03-04-2008 10:46 AM
unzip particular gzip files among the normal data files thepurple Shell Programming and Scripting 4 11-30-2007 08:17 AM
when I try to run rm on multiple files I have problem to delete files with space umen UNIX for Dummies Questions & Answers 1 09-20-2005 12:20 AM
text files, ASCII files, binary files and ftp transfers Perderabo Answers to Frequently Asked Questions 0 04-08-2004 01:25 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-04-2003
Registered User
 

Join Date: May 2002
Posts: 25
last 5 files

Hi,
Is there a way that we can get the last files (ex, recent 5 files) that came into a directory. Thanks.
Forum Sponsor
  #2  
Old 06-04-2003
Karma's Avatar
Registered User
 

Join Date: Jun 2003
Location: Canada
Posts: 142
In what sense? the last deleted files? recover them? have them sent to you? a list of files that were last cp'd to the directory?
  #3  
Old 06-04-2003
Registered User
 

Join Date: May 2002
Posts: 25
These are kind of log files and I need the last 5 files.
  #4  
Old 06-04-2003
Karma's Avatar
Registered User
 

Join Date: Jun 2003
Location: Canada
Posts: 142
are they still in the directory? do you only want the names, or do you want the files themselves?
  #5  
Old 06-04-2003
Registered User
 

Join Date: May 2002
Posts: 25
Names would be fine.
  #6  
Old 06-04-2003
Karma's Avatar
Registered User
 

Join Date: Jun 2003
Location: Canada
Posts: 142
I am afraid that i know of no such technique without your previously having installed some sort of surveilance device (keyloger, directory sniffer, etc.). It is possible to retrieve this information from playing with your FS in ways that are far from humane. If this is not a life-or-death case, i reccomend installing one of the aforementioned tools for future use.
  #7  
Old 06-04-2003
oombera's Avatar
Registered User
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
Try this code:
Code:
ls -tc some/dir | head -5
It will list the last 5 modified files..
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:07 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0