This is my setup in /tmp/test/
if I use ls -l
-rw-r--r-- 1 rubo77 rubo77 0 Okt 21 04:15 a
-rw-r--r-- 1 rubo77 rubo77 2 Okt 21 04:16 b
drwxr-xr-x 2 rubo77 rubo77 4,0K Okt 21 03:58 c
lrwxrwxrwx 1 rubo77 rubo77 1 Okt 21 03:57 d -> c
lrwxrwxrwx 1 rubo77 rubo77 1 Okt 21 03:58 e -> a
lrwxrwxrwx 1 rubo77 rubo77 2 Okt 21 03:59 f -> nofile
If I use just ls
I see only the files without details:
a b c d e f
ls -F
appends an indicator (one of */=>@|) to entries
a b c/ d@ e@ f@
How can I achieve this display?
a b c/ d->c/ e->a f->nofile
ls -l | grep "->"
. there's probably a way to get rid of the additional information, but I don't really feel like poking through the manpage right now. – strugee Oct 21 '13 at 02:41ls
. But maybe with another command? – rubo77 Oct 21 '13 at 02:44ls
. You'll have to do your ownstat
andreadlink
then your own formatting in columns (you could callls
to leverage the coloring). – Gilles 'SO- stop being evil' Oct 21 '13 at 15:47a b c/ d->~/dev/kernel/net/wireless/mac80211/blah.c e->../../../dir/file f->e
. Furthermore, what if the link is pointing to another link; how is that handled? It may be worth scripting to you, but probably not a default put intols
or any other listing programs. – Jacob Minshall Oct 21 '13 at 04:13