LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-03-2008, 10:56 AM   #1
dlnlinux
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Rep: Reputation: 0
find all files in current folder and all subfolders and sort all by timestamp


From the command line, is there a command to find all files in current folder and all subfolders and sort all by timestamp? found a way to sort them by size but so far have not found how to sort all the files by timestamp.
 
Old 06-03-2008, 11:21 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,503

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
What about the following?
Code:
find /path/to/dir -type f -print0 | xargs -0 ls -lrt
 
Old 06-03-2008, 11:29 AM   #3
dlnlinux
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Cool worked perfectly

Quote:
Originally Posted by colucix View Post
What about the following?
Code:
find /path/to/dir -type f -print0 | xargs -0 ls -lrt

Worked perfectly, many thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
script to sort files according to timestamp aeby Linux - Newbie 1 05-16-2007 08:18 AM
Determine if folder has subfolders with out overhead from find or ls davstin2002 Programming 8 12-21-2006 02:26 PM
Determine if folder has subfolders with out overhead from find or ls davstin2002 Programming 1 12-20-2006 05:49 PM


All times are GMT -5. The time now is 05:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration