ls, dirs first, files later
Hi,
how do I list the contents of a directory so the directories are first listed, and later files ? Thanks, Troels |
maybe ls -d
? |
No I have tried that, and it does not seem to work.
|
if you are using bash write a function like this
zeropash@zeropash$ function myls() { find $1 -maxdepth 1 -type d; find $1 -maxdepth 1 -type f; } zeropash@zeropash$ myls firefox does this help? if you want write a script :) and use it |
The find function truly does what I wanted - exept for:
1. It doesn't know how to put color if it finds a directoroy 2. I don't want to find files starting with a '.' Something like: ls -gotpUXh |less but listing directories first would be awesome. - sorry for bothering everyone with this question, but I really don't understand why ls doesn't have this option. Thanks |
All times are GMT -5. The time now is 08:27 AM. |