Solved

Listing file in directory by created and last modified

Posted on 2006-06-21
7
231 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
  • 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 100 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now