Solved

Listing file in directory by created and last modified

Posted on 2006-06-21
7
232 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…

813 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

11 Experts available now in Live!

Get 1:1 Help Now