On 01Dec2006 13:08, Loyal Barber <[EMAIL PROTECTED]> wrote: | > On 30Nov2006 19:17, Loyal Barber <[EMAIL PROTECTED]> wrote: | > | echo "a" > junk.kil | > | ls -lk junk.kil | > | | > | The size display will be in 1kb blocks. Since the contents of the file | > | should be much smaller than the block size, the file should take up one | > | block. | > | > This is an arbitrary 1024 byte "block" count, a figment of "ls"'s | > imagination. I'm pretty sure it reveals nothing about the actual block size | > of the filesystem. | | The 1K block size count is not arbitrary but forced by the -k option.
I mean "arbitrary" in that it has nothing to do with the _filesystem_ block size. It's 1024 bytes, and the filesystem setup has no effect it. | If the block size on the file system was 4096 bytes, the ls command would | yield 4 for size. So: in what way does this let you determine the filesystem block size. If the file system block size were 512 bytes or 1024 bytes or 4096 bytes, how would ls's output change. If ls's output does not change, it is not possible to deduce the filesystem block size. Please explain your reasoning with an example. | See "man ls" if you need help. It says nothing about the behaviour you're describing. Tests show your assertion to be untrue, or that I misunderstand you. Watch: [/home/cameron]zoob*> dd if=/dev/zero of=foo bs=1 count=4097 4097+0 records in 4097+0 records out 4097 bytes (4.1 kB) copied, 0.0105294 seconds, 389 kB/s [/home/cameron]zoob*> ls -lk foo -rw-rw-r-- 1 cameron cameron 5 Dec 2 08:55 foo [/home/cameron]zoob*> ls -l foo -rw-rw-r-- 1 cameron cameron 4097 Dec 2 08:55 foo Here we have ls asserting "5" blocks for "foo". Were blocks 1024 bytes, then this would be true. But this filesystem uses 4096 byte blocks, as verified from a "tune2fs -l /dev/hda1" command. Now, I understand that ls is using 1024 bytes in its computation, and that naturally says "5" (4 x 1024, plus 1 block for the last byte). What I do not understand is how you expect to learn the _filesystem_ block size from the output of ls. -- Cameron Simpson <[EMAIL PROTECTED]> DoD#743 http://www.cskk.ezoshosting.com/cs/ I've always been a big Greenaway fan - I've seen and enjoyed "The Falls" for crying out loud. - Peter Alexander Merel <[EMAIL PROTECTED]> To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be removed. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/LINUX_Newbies/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/LINUX_Newbies/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
