[问题] UNIX file system: Block size

胡说之

Moderator
注册
2002-01-17
消息
5,182
荣誉分数
6
声望点数
0
A quick question:

How to determin the block size of a file system in hard disk? In legacy system it's 512 bytes in most cases. Is there a shell command doing the checking?
 
how about "wc". Need to do some calculation though.
 
2K are most the cases.

最初由 胡说之 发布
A quick question:

How to determin the block size of a file system in hard disk? In legacy system it's 512 bytes in most cases. Is there a shell command doing the checking?
 
[(df -k ) kbytes column] / [(df) blockes ] = 0.5
 
Just figuered a work around:

use "mkdir" to set an empty directory, which should use 1 block, then "ls -l [directory]" to see the bytes.
 
后退
顶部