In ls output, I'd like to group symlinks that point to directories along with the rest of the directories, but still have a way of telling that it's a symlink either with color or an appended symbol. Is there a way to do this?
If a symlink points to a directory, you can tell in output from ls by using the -F, --classify argument and by setting LINK target in the dircolors. Then it will be shown as dir_link@, but with the same color as a directory.
The ls command can group directories together with the --group-directories-first option.
The only way I can see to group symlinks to directories along with other directories is to use the -L, --dereference option. But this changes both the appended indicator as well as the color of the entry (even if you set links to be displayed as their own color independent of the target); it's then indistinguishable from a regular directory.
I'm using GNU ls on Linux.
ls -al(often aliased asll) and when it displays symlinks, it lists them likedirectoryname -> path/to/linked/location. it usually colors valid links one color, and broken links in red.--dereferenceoption in order to get the directory links sorted next to the directories, then it even stops showing the target information in the long output!