Talk:Df (Unix)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated B-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
B-Class article B  This article has been rated as B-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
 

Isn't the default 1K blocks? --70.132.24.230 19:42, 15 January 2006 (UTC)

The default output of df is blocks; however, blocks default to 512b, 1k, or 8k, depending on the filesystem in question. --ssd 07:41, 16 January 2006 (UTC)

df fakes the numbers?[edit]

The UNIX Haters Handbook states that df (obviously circa 1990) fakes the numbers to prevent a disk from actually becoming 100% full, except for root. Is this the case in the GNU implementation (or indeed was it ever the case)? — The preceding unsigned comment was added by Rossheth (talkcontribs) 21:49, 3 February 2007 (UTC).

I'm not sure it's df that does that. A standard option for Linux when setting up filesystems is to reserve a set percentage (usually 5%) for root, but df sort of reports it. That is, I can run df and get /dev/hda6 ext3 66G 62G 407M 100% /home on one line; obviously 407M + 62G != 66G. The difference is the reserved percentage. --Gwern (contribs) 01:22 4 February 2007 (GMT)
Gwern is right, most (if not all) Unix like system reserve some diskspace, IEEE Std 1003.1, 2004 Edition states:
<percentage used>
The percentage of the normally available space that is currently allocated to all files on the file system. This shall be calculated using the fraction: <space used>/( <space used>+ <space free>) expressed as a percentage. This percentage may be greater than 100 if <space free> is less than zero. The percentage value shall be expressed as a positive integer, with any fractional result causing it to be rounded to the next highest integer.
Note Editing main page to include this Carpetsmoker 01:50, 15 February 2007 (UTC)

Example table[edit]

I removed the example table. It didn't seem to add anything to the article. Perhaps the existing example can be converted into a table, but what is the point?

Filesystem Total (1024-blocks) Free Space  %Used IUsed  %IUsed Mounted on
/dev/hd2 4587520 1889420 59% 37791 4% /usr
4.58 GB 18.89 GB

--Unixguy 19:20, 27 February 2007 (UTC)

I agree, it looks ugly to :/ Carpetsmoker 18:06, 1 March 2007 (UTC)