Solved

Listing file in directory by created and last modified

Posted on 2006-06-21
7
230 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
Comment Utility
$ ls -lt
or

$ ls -ltr
for reverse order
0
 

Author Comment

by:operation1611
Comment Utility
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
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

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

Expert Comment

by:slyong
Comment Utility
it is last modified date.
0
 
LVL 12

Expert Comment

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

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

762 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

16 Experts available now in Live!

Get 1:1 Help Now