Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdchema.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!decvax!ucbvax!sdcsvax!sdchema!donn From: donn@sdchema.UUCP (Donn Seeley) Newsgroups: net.bugs.4bsd Subject: Annoying new feature of 4.2 'ls -F' Message-ID: <1044@sdchema.UUCP> Date: Sun, 12-Feb-84 04:01:10 EST Article-I.D.: sdchema.1044 Posted: Sun Feb 12 04:01:10 1984 Date-Received: Tue, 28-Feb-84 01:05:32 EST Organization: UC San Diego Chemistry Dept. NIH Research Resource Lines: 58 The distributed 4.2 BSD 'ls' has the 'feature' that if a symbolic link points to a directory, 'ls -F' won't tell you that the file is a symbolic link. This is a benefit to people who use plain 'ls' and would like to see the difference between a link to a normal file and a link to a directory. (I'm all for this, except I would rather see both attributes represented instead of dropping the information that the file is a link. For example a link 'symdir' to a directory would be listed by 'ls -F' as 'symdir@/'.) As things stand however, I would prefer the old behavior over the new behavior. I alias 'ls' to 'ls -F' and use the old 'ls' to detect symbolic links. I'm too lazy at the moment to implement my parenthetical suggestion, so I re-created the old behavior by ifdeffing out the new 'feature': ------------------------------------------------------------ *** /usr/src/bin/ls.c Sun Sep 25 18:05:04 1983 --- ls.c Sat Feb 11 23:47:56 1984 *************** *** 309,314 } break; } if (stat(file, &stb1) < 0) break; if ((stb1.st_mode & S_IFMT) == S_IFDIR) { --- 309,315 ----- } break; } + #ifdef notdef if (stat(file, &stb1) < 0) break; if ((stb1.st_mode & S_IFMT) == S_IFDIR) { *************** *** 317,322 fp->fsize = stb.st_size; fp->fblks = stb.st_blocks; } break; } fp->fnum = stb.st_ino; --- 318,324 ----- fp->fsize = stb.st_size; fp->fblks = stb.st_blocks; } + #endif notdef break; } fp->fnum = stb.st_ino; ------------------------------------------------------------ Regardless of one's feelings on the matter, there IS a bug in the documentation -- this 'feature' is never mentioned. While I'm on the subject, there is no entry for the '-A' option either... I guess with so many options and features it's easy to miss one here and there. Donn Seeley UCSD Chemistry Dept. RRCF ucbvax!sdcsvax!sdchema!donn