bug in 4.1bsd "ls -R" (with fix)
ado at elsie.UUCP
ado at elsie.UUCP
Wed Jul 11 04:41:07 AEST 1984
Index--
"/usr/src/cmd/ls/ucbls.c"
Description--
Doing an "ls -R" can sometimes give spurious output.
Repeat by--
mkdir dir1 dir1/sub1 dir2
cp /dev/null dir1/sub1/a
cp /dev/null dir1/sub1/b
cp /dev/null dir2/c
/usr/ucb/ls -R dir1 dir2 > results
The distributed version of "/usr/ucb/ls" writes this to "results":
dir1:
sub1
dir1/sub1:
a
b
b
where what's to be expected is:
dir1:
sub1
dir1/sub1:
a
b
dir2:
c
Fix thusly--
ed /usr/src/cmd/ls/ucbls.c
/pdirectory.*firstp/c
#ifdef OLDVERSION
pdirectory (dtemp->dc_name, 1, firstp);
#else
pdirectory (dtemp->dc_name, 1, slastp);
#endif
.
w
q
While in the neighborhood, those of you running uucp on VAXen who are tired of
getting "ls: too many files" messages when listing a constipated
"/usr/spool/uucp" directory may want to make this change:
ed /usr/src/cmd/ls/ucbls.c
/NFILES/c
#ifdef OLDVERSION
#define NFILES 1024
#else
#define NFILES 10240
#endif
.
w
q
--
...decvax!allegra!umcp-cs!elsie!ado (301) 496-5688
(the DEC and VAX in decvax are Digital Equipment Corporation trademarks)
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list