LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 05-20-2005, 10:35 AM   #1
learnfast
Member
 
Registered: Mar 2005
Location: berlin
Distribution: Redhat 9, Fedora 3
Posts: 70

Rep: Reputation: 15
how to list most recent files last: "ls -altr" is almost it


I am looking for a way to list all files in a directory in reverse date order so that I can see which ones are newest.

I figured out this:

ls -altr

but it also returns the files in teh directories UNDER the current directory.
it also doesn't display the time for some reason

How can I list ONLY for the current directory's files WITH the time listed?

Thanks.
 
Old 05-20-2005, 10:53 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

The command given (ls -latr) does (should do) what you want.

Could it be that your 'problems' are related to an aliased ls?? If you don't know how to retrieve this info: alias <enter>.

This entry:
alias ls='ls --color=auto'
is fairly common and is not responsible for the strange behaviour you are describing.

Hope this helps.
 
  


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
DPKG & "files list file for package `pkg-config' contains empty filename" error :( Angelus Debian 2 04-02-2005 07:34 AM
User "list" running process "python" TroelsSmit Linux - Newbie 2 02-22-2005 04:55 AM
Clearing "recent files" list in Rh 9 moxieman99 Linux - Newbie 2 11-11-2004 07:19 AM
how would I list a sequence of files as "seq.$F4.ext : 1-100" BrianK Programming 0 07-12-2004 07:43 PM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM


All times are GMT -5. The time now is 04:02 AM.

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