[5247] in Athena Bugs
vax 7.0F: ls
daemon@ATHENA.MIT.EDU (vanharen@ATHENA.MIT.EDU)
Thu Jun 21 23:33:28 1990
From: vanharen@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Cc: bug-ls@ATHENA.MIT.EDU
Date: Thu, 21 Jun 90 23:33:07 EDT
System name: fries
Type and version: CVAXSTAR 7.0F (2 update(s) to same version)
Display type: SM
What were you trying to do?
list file sizes.
What's wrong:
ls reports the wrong file size (in blocks) for symlinks to
directories when doing a short listing. It reports the size of
the directory pointed to instead of the size of the link, which
should be 1. ls does not have this problem with links to files,
however.
What should have happened:
ls should behave the same for links to files as with links to
directories.
Example:
I cd'ed to /site/tmp and created foo, foo2, foo3, and foo4
foo, foo2, and foo3 are links to .
foo4 is a link to another file (my kerb tickets).
Now, observe the differences in sizes as reported by "ls -s" with and
without the "-l" option:
% ls -s
total 21
1 bug906.text 1 foo4@
1 clusterinfo 1 motd.LS/
1 clusterinfo.bsh 1 motd.mss
0 console.log 1 root
0 esrv9674= 1 session_gate_pid.9674
3 foo/ 2 tkt_ttyv0
3 foo2/ 1 tmp/
3 foo3/ 1 wg.000397
% ls -ls
total 15
1 -rw-r--r-- 1 vanharen wheel 486 Jun 21 23:24 bug906.text
1 -rw-r--r-- 1 root wheel 94 Jun 21 19:52 clusterinfo
1 -rw-r--r-- 1 root wheel 128 Jun 21 19:52 clusterinfo.bsh
0 -rw------- 1 root wheel 0 Jun 21 19:52 console.log
0 srwxrwxrwx 1 vanharen wheel 0 Jun 21 19:54 esrv9674=
1 lrwxrwxrwx 1 vanharen wheel 1 Jun 21 22:35 foo@ -> .
1 lrwxrwxrwx 1 vanharen wheel 1 Jun 21 22:37 foo2@ -> .
1 lrwxrwxrwx 1 vanharen wheel 1 Jun 21 22:38 foo3@ -> .
1 lrwxrwxrwx 1 vanharen wheel 9 Jun 21 22:40 foo4@ -> tkt_ttyv0
1 drwxr-xr-x 2 vanharen wheel 512 Jun 21 23:03 motd.LS/
1 -rw-r--r-- 1 vanharen wheel 338 Jun 21 23:03 motd.mss
1 -rw------- 1 vanharen wheel 263 Jun 21 22:00 root
1 -rw------- 1 vanharen wheel 4 Jun 21 19:53 session_gate_pid.9674
2 -rw------- 1 vanharen mit 1427 Jun 21 23:07 tkt_ttyv0
1 drwxr-xr-x 2 vanharen wheel 512 Jun 21 22:48 tmp/
1 -rw-r--r-- 1 vanharen wheel 6 Jun 21 19:53 wg.000397
Here, you can see that the directory is 3 blocks.
% ls -lds
3 drwxrwxrwt 5 root wheel 2560 Jun 21 23:24 ./