Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Listing file in directory by created and last modified

Posted on 2006-06-21
7
Medium Priority
?
239 Views
Last Modified: 2013-12-16
How to view listing of file in directory by date & time created and last modified. or maybe a script of single command line?

thanks
0
Comment
Question by:operation1611
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 24

Expert Comment

by:slyong
ID: 16957195
$ ls -lt
or

$ ls -ltr
for reverse order
0
 

Author Comment

by:operation1611
ID: 16957219
this command is for last modified/access rite?...it not show the date the file was created...

does any one has the script?...because in the folder there is lot of folder. And in the folder there is a lot of files....so if got the script maybe the output can be generate to txt file.
0
 
LVL 24

Accepted Solution

by:
slyong earned 400 total points
ID: 16957237
ls -t is the last modified date.  You can use a redirect into a txt file:

$ ls -lrtR > list.txt

P/S: R is for recursive
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

Author Comment

by:operation1611
ID: 16957346
thank you...but the date is last modified or date created? tq
0
 
LVL 24

Expert Comment

by:slyong
ID: 16957719
it is last modified date.
0
 
LVL 12

Expert Comment

by:ibu1
ID: 17113612
ls -altr
Will show u the file last modified
0
 
LVL 12

Expert Comment

by:ibu1
ID: 17113619
For more help refer this link
http://www.computerhope.com/unix/uls.htm
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question