LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration