4
votes
3answers
126 views

What could be the use case of changing modified time of a file to the future?

I was reading through the man page of ls on UNIX, specifically OS X Mavericks. This got me intrigued: If the modification time of the file is more than 6 months in the past or future, then the ...
4
votes
2answers
169 views

Sort files by modification time

I've seen many questions and answers here using a construction along the lines of list_dir=`ls -t /path/to/dir/` for i in $list_dir; do or ls -t | while read i; do Now, I know that you shouldn't ...
3
votes
2answers
2k views

list all files newer than given timestamp and sort them

I want to list all files (sorted by date) that are newer than timestamp in format 20130207003851 in directory /tmp only. Subdirectories can be omitted. Using SUSE Linux Enterprise Server 11. The ...
1
vote
1answer
379 views

Why ls -lrth and ls -ltch gives different results

I was trying to find the time of database backup. Normally i use ls -ltch But this time i used ls -lrth It gave me different result for One file and all date-stamps were same for both ...
1
vote
2answers
4k views

Solaris + display file time stamp [year][month][day]

I have Solaris 10 machine I need to verify time stamp of some file in my Solaris machine And to get the following format [year][month][day] Example of working command on Linux ls -l ...
25
votes
2answers
17k views

How do I do a ls and then sort the results by date created?

In what order are the dated ordered by? Certainly not alphanumeric order. ls -lt sorts by modification time. But I need creation time.