分页: 1 / 1

谁会设置BLOCKSIZE

发表于 : 2007-11-01 9:58
eexpress
省略 df du 的 -h 参数啊。

BLOCKSIZE=HUMAN
BLOCKSIZE=HUMAN-READABLE
不知道怎么设置。
DF_BLOCK_SIZE
This specifies the default block size for the df command. Similarly, DU_BLOCK_SIZE specifies the default for du and LS_BLOCK_SIZE for ls.
BLOCK_SIZE
This specifies the default block size for all three commands, if the above command-specific environment variables are not set.
BLOCKSIZE
This specifies the default block size for all values that are normally printed as blocks, if neither BLOCK_SIZE nor the above command-specific environment variables are set. Unlike the other environment variables, BLOCKSIZE does not affect values that are normally printed as byte counts, e.g., the file sizes contained in ls -l output.
POSIXLY_CORRECT
If neither command_BLOCK_SIZE, nor BLOCK_SIZE, nor BLOCKSIZE is set, but this variable is set, the block size defaults to 512.
变量
变量 POSIXLY_CORRECT 确定计数单位的选择。如果没有设置此变量并且环境变量 BLOCKSIZE 的值 以
HUMAN 为 前 缀,那么,除了 -k 或 -m 选项优先生效的情况,计数单位的行为同于 -h 选项。变量
LANG、LC_ALL、LC_CTYPE 和 LC_MESSAGES 的意义和字面上一样。

发表于 : 2007-11-01 13:05
bones7456
这是环境变量吗?

发表于 : 2007-11-02 0:00
悬非
ee 你都来提问拉!
呵呵就算我知道也不怎么敢随便答阿!


呵呵 说笑拉 你要的效果我还不是很明白:)呵呵可能我的理解能力这个时间段还没修复好 呵呵

发表于 : 2007-11-02 14:20
eexpress
我经常有问题的啊。不会就问啊。你知道赶紧说哦。别害我每次df带一个-h哦。 :lol:

发表于 : 2007-11-02 20:29
悬非
我个人觉得这不关系统的事,只是他们都默认遵守那种规则 如果你偏要改的话 我觉得要每个工具改原代码再从新编译了哦

发表于 : 2007-11-02 21:16
eexpress
@@啊。man里面说明了。就是遵循这3个环境变量的。

发表于 : 2007-11-03 14:34
bones7456
试了,似乎和man里说的不一样...

发表于 : 2007-11-03 22:48
roylez
eexpress 写了:我经常有问题的啊。不会就问啊。你知道赶紧说哦。别害我每次df带一个-h哦。 :lol:
alias 一下不行吗?

发表于 : 2007-11-03 23:10
eexpress
哇哇。天。晕死。你竟然出这主意。有时候,研究下啊。

发表于 : 2007-11-03 23:52
roylez
我研究做烦了……