Hello,

Symlink is one of ugly things in unix.
For example, my mac shows:

-bash$ ls -l /usr/bin/vi
lrwxr-xr-x  1 root  wheel  3 11 18  2014 /usr/bin/vi -> vim
-bash$

This expression is something like a thorn.
Irregular fields makes things difficult.
The entity of /usr/bin/vi is /usr/bin/vim, which is

-bash$ ls -l /usr/bin/vim
-rwxr-xr-x  1 root  wheel  1530240  6 24  2016 /usr/bin/vim
-bash$

I guess Russ hated the irregularity.
In plan9port we have

-bash$ 9 ls -l /usr/bin/vi
-Lrwxr-xr-x M 0 root wheel 3 Jun 24  2016 /usr/bin/vi
-bash$ 

but I wander why this isn't

-bash$ 9 ls -l /usr/bin/vi
-Lrwxr-xr-x M 0 root wheel 1530240 Jun 24  2016 /usr/bin/vi
-bash$ 

This comes from $P9P/src/lib9/_p9dir.c

                if(S_ISLNK(lst->st_mode)){      /* yes, lst not st */
                        d->mode |= DMSYMLINK;
                        d->length = lst->st_size;               <----- why Russ 
put this code?
                }

Any merit?

Kenji Arisawa

-----

P.S. This mail is resent because the mail wasn't received by 9fans.


Reply via email to