rcj@burl.UUCP (09/29/83)
Our filesystems are configured as 1024-byte-block systems. The '-s' option on 'ls', however, lists the block sizes of files in number of *512*-byte blocks -- this discrepancy is not noted in the man page to my knowledge. Also, the 'find' command states that its '-size' option takes a number of 512-byte blocks as an argument, but this is not true. find /usr/games -size 133 -exec ls -ls {} \; yields: 269 -r-x------ 1 bin bin 135920 Apr 11 18:32 cbrogue Note that 1024 * 133 = 136192; 'find' is obviously using 1024-byte blocks. No other size will find the file 'cbrogue'. Anybody know of a rationale for this stuff? P.S.: Before anyone points out from the 'ls -ls' that 269 * 512 = 137728; which is much too large, remember that the '-s' option of 'ls' includes in its block count the number of indirect blocks as well. -- The MAD Programmer -- 919-228-3814 (Cornet 291) alias: Curtis Jackson ...![ floyd clyde ihnp4 mhuxv ]!burl!rcj
mel@houxm.UUCP (09/30/83)
This whole "block size" thing is really STUPID ! Why do we put up with it? Why don't we all just agree to refer to file and buffer sizes in bytes and Kbytes (1024 bytes), and stop this blockheadedness. There aren't 10 people in the country that can keep straight which program on what machine reports "blocks" in so-and-so size (and they are all in the nut house, along with the guy that can multiply 35 digit numbers in his head). What happens when someone foists the multi-size block file system onto us? How much of a job would it be to fix ALL the size reporting programs to use bytes or Kbytes (appropriately so marked, of course)? Would the cost be even a fraction of the lost time caused by the present mess? Mel Haas , houxm!mel
guy@rlgvax.UUCP (Guy Harris) (10/01/83)
I agree that all UNIX commands should have one and only one idea of how big a "block" is, be it 512 bytes (natural because all DEC hardware works in those block sizes) or 1024 bytes (even more natural because most real capacities are given in KB or MB; besides, not all UNIX systems are on DEC hardware these days - our Power 5 has 1024-byte blocks in hardware on its disks). It's nice to be able to compare the output of "ls" and "df", and to use those numbers with "find". Guy Harris {seismo,mcnc,we13,brl-bmd,allegra}!rlgvax!guy