![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
These are kind of log files and I need the last 5 files.
|
|
#4
|
||||
|
||||
|
are they still in the directory? do you only want the names, or do you want the files themselves?
|
|
#5
|
|||
|
|||
|
Names would be fine.
|
|
#6
|
||||
|
||||
|
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
|
||||
|
||||
|
Try this code:
Code:
ls -tc some/dir | head -5 |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|