advanced ls
hello!
I would like with a command similar to ls, to display the contents (with their details) in two columns, one sorted by name and the other sorted by date created, modified, etc is it possible? thanks! |
I don't understand the sorting you have in mind---please show a sample of the normal output from "ls -l", and then what you want it to look like after sorting.
Before trying to get fancy, be sure to read thru the man page for ls---to see all the options available. |
there is sorting per filename (alphabetically)
there is also sorting per date that each file was created different ls parameters output each of these sortings what I want is by typing ls command once (with some parameters maybe) to output at the same time the file list in two versions (one next to the other), one sorted by name, the other sorted by ctime hope it's clearer now |
You could use a shell script for this and alias this to a an, yeah, alias.
Ruff idead. Do the two ls commands and have the output redirect to files. After this use diff with side-by-side view or I can't recall the name. But there should be a programm that lets you view files side by side. |
am I the only that finds it useful?
|
Quote:
Code:
paste <(ls -l) <(ls -ltr) |
wow this is brilliant thanks!!
however, text wrapping messes up the lists is there a parameter to prevent this? |
Use a wider terminal or truncate some of the output (can be done with the cut command)
|
All times are GMT -5. The time now is 01:25 PM. |