directories first in ls display?
Hi,
I am having trouble fuguring out how to issue the 'ls' command so that the directories are listed first. Also, I would like to use the 'ls' command to sort by file extension. Can anyone help with these (probably simple!) pieces of syntax? Regards, Geoff. |
Hi,
I think $> ls -X is what you're looking for. (Don't forget to capitalize the X.) Götz |
Hi,
Thanks for the help. Yes, the command 'ls -lX' displays the files in order by their extension. Any idea how to get the directories to list first? Regards, Geoff. |
:scratch: not sure if there's a flag for ls for that
you could always capitalize the dir's and keep files lowercase..... |
ls --group-directories-first
Hi hi. Is this what you're looking for?
By the way, if my directories *are* capiltalised, then how do i use the ls command to sort alphabetically with capitals first, before lowercase? Default ls sorting seems to ignore capitals. (Just curious). |
Quote:
Quote:
Code:
export LC_COLLATE=C Cheers, Tink P.S.: For future reference: if you have questions, please don't dig up corpses of long gone threads to tack them on to the end of those. Cheers, Tink |
directory listing
a simple listing of all directories immediately under pwd...
find ./ -maxdepth 1 -type d more information about those directories (I have this command aliased in .bash_profile)... ls -l | grep ^d :-) |
*cough*
wow Tink you're right....this thread is a bit dusty....
|
apologies
sorry, first post in a forum --- i'm (obviously) not versed on the etiquette. found it on a google search when looking for the same problem... thought i might be helpful to the question poser by posting what i'd found. but, ahem, apparently not.
thanks for the replies anyhoo. next time (if i get up the courage to post something again) i will look at the date. |
Quote:
Quote:
Quote:
Cheers, Tink |
All times are GMT -5. The time now is 02:05 AM. |