ls -> Column Order
Hello,
Is there a way to sort the columns with the 'ls' command? What I'm trying to do is have the file/directory names in the first column, and all the other information to the right of it. Thanks a lot! -Dale |
The difficulty with putting the filenames first is that you can't predict how wide that first column should be.
If you get past that, though, you can transmogrify the output of the ls output. Do this at the shell prompt: Code:
man cut |
It may take a very complicated awk script to do it half way decently and then it still wouldn't look good.
You would have to keep track of the filesize and filename widths on each page of output and use that to adjust the field widths. Otherwise the columns wouldn't line up. Try this badly written awk script for your self. You'll see what I mean: Code:
/total/ { print $0 } |
Thank for the replies!
I guess I'll just get used to having them on the right though. |
All times are GMT -5. The time now is 04:16 PM. |