On Wed, Dec 30, 2009 at 11:02:16PM EST, Eric Blake wrote:

[..]

> Use -F to distinguish between symlinks and other files via the
> appended @.  Use "LINK target" to distinguish between symlinks to
> directories vs.  symlinks to files via the color.  So using both
> pieces together gives you a full picture of what a particular name
> represents, with no new code needed.

I prefer verbose output, so I have 'l' aliased to "ls -alh --full-time
--color=always". 

The -F switch causes '/' to be appended to directories and as far as I
am concerned also does the trick color-wise:

------------------------------------------------------------------------
$ l -F /tmp/ldirs
total 20K
drwxr-xr-x  3 user user 4.0K 2009-12-30 18:14:30  [..]  ./
drwxrwxrwt 27 root root  12K 2009-12-31 01:04:38  [..]  ../
drwxr-xr-x  2 user user 4.0K 2009-12-30 18:18:13  [..]  dir/
lrwxrwxrwx  1 user user    4 2009-12-30 18:14:30  [..]  fff³ -> file¹
-rw-r--r--  1 user user    0 2009-12-30 18:14:02  [..]  file
lrwxrwxrwx  1 user user    3 2009-12-30 18:14:15  [..]  xxx³ -> dir/²
------------------------------------------------------------------------

¹ file is white
² dir/ is blue
³ soft links 'fff' and 'xxx' are a very light purple

So it's very easy to tell at a glance whether the soft link's target is
a directory or a regular file.

But pardon my ignorance, where exactly do you specify "LINK target"?

Thanks,

CJ



Reply via email to