Hi Johannes, Great info! Thanks!
Well, what to do with BusyBox 'ls' then? In BusyBox the option '-k' is taken by the SELINUX features (List security context) Should we make 'ls' more POSIX and GNU compliant? Then '-k' should be for blocks of 1024 bytes and SELINUX (List security context) would have to move to some other character option. Maybe some of the maintainers could shine some light on this matter? Who to ask? Regards Jorgen Overgaard > POSIX says: > > If any of the -l, -n, -s options is specified, each list > of files within the directory shall be preceded by a > status line indicating the number of file system blocks > occupied by files in the directory in 512-byte units if > the -k option is not specified, or 1024-byte units if the > -k option is specified, rounded up to the next integral > number of units, if necessary. In the POSIX locale, the > format shall be: > > "total %u\n", <number of units in the directory> > > http://www.opengroup.org/onlinepubs/9699919799/utilities/ls.html > > > HTH > Johannes > > > On Thu, Oct 01, 2009 at 07:46:17PM +0200, Jörgen Overgaard wrote: >> Yes it will be doing a 'du' job. >> >> I do not know if that is some BSD or GNU extension. >> All I know, is that the application I was trying to get running under >> BusyBox, expected 'ls -l' to return the total stuff. >> Also in the source for ls.c it says >> >> * KNOWN BUGS: >> * 1. ls -l of a directory doesn't give "total <blocks>" header >> >> So I decided to "fix" that and put that patch on the mailing list. >> >> Wrong or right? I do not know. I am used to see that total header >> when telling ls to do a long list format but never use it my self. >> >> Perhaps remove that BUG notice in the source of ls.c? >> Or make it optional during compile to support totals or not from >> configure? -DLS_LONG_WITH_TOTAL ;-) >> >> Regards >> Jorgen Overgaard >> >> Cathey, Jim skrev: >> >> I had some software that used ls -l and expected the total blocks >> >> to be on the first line of the output from ls. >> > >> > That's a new one on me. Is that some kind of BSD >> > or GNU extension? I'm not really in favor of it >> > doing a 'du' job as well. >> > >> > -- Jim >> > >> > >> > >> > >> > _______________________________________________ >> > busybox mailing list >> > [email protected] >> > http://lists.busybox.net/mailman/listinfo/busybox >> > >> > __________ NOD32 4473 (20091001) Information __________ >> > >> > Detta meddelande är genomsökt av NOD32 Antivirus. >> > http://www.nod32.com >> > >> > >> > >> >> _______________________________________________ >> busybox mailing list >> [email protected] >> http://lists.busybox.net/mailman/listinfo/busybox >> > _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
