
linux - df -h and df -kh? - Unix & Linux Stack Exchange
2020年12月5日 · The -h option to df selects "human readable" output, meaning that the sizes of things will be scaled to appropriate amounts to give nice small readable values, such as 2.1G, or 806M. The -k option does something similar, but scales the sizes to kilobytes only, so you'll get e.g. 2165680 and 824550 instead of 2.1G and 806M.
df vs. du: why so much difference? - Unix & Linux Stack Exchange
Basically, df reads the superblock only and trusts it completely. du reads each object and sums them up. Also, a running process can keep a deleted file open. This means the space will still be reserved and seen by df, but since du will no longer see a reference to that file in the directory tree, it cannot see those reserved blocks.
What does "1K-blocks" column mean in the output of `df`?
2015年1月16日 · Older versions of Unix used 512-byte blocks in the filesystem, and that's the (undocumented) unit that df used - it showed the number of free blocks (V7 df man page). When Berkeley changed the block size in the filesystem to 1024 bytes, df (4BSD df source code) still showed the sizes in terms of blocks, and the 4BSD df man page added:
Get the free space available in current directory in Bash - Unix ...
df: (disk free) is a standard Unix command used to display the amount of available disk space for file systems on which the invoking user has appropriate read access. -h : to show the output in a human-readable format i.e. megabytes, gigabytes, and so on.
mount - Why is 'df' hanging? - Unix & Linux Stack Exchange
The most common cause of software like df hanging is when they're trying to read from a disk that isn't responsing properly. Check the output from dmesg to see if this is the case -- a flaky drive will toss out a great deal of errors.
What's the difference between du and df? - Unix & Linux Stack …
2017年12月15日 · I would like to know exactly what du and df mean. The following is an example of the output of the df command. Filesystem Size Used Avail Use% Mounted on ubi0:rootfs 435M 424M 12M 9...
ls - How do I get the size of a directory on the command line?
2015年2月20日 · df -h .; du -sh -- * | sort -hr This shows how much disk space you have left on the current drive and then tells you how much every file/directory takes up. e.g., Filesystem Size Used Avail Use% Mounted on /dev/sdb2 206G 167G 29G 86% / 115M node_modules 2.1M examples 68K src 4.0K webpack.config.js 4.0K README.md 4.0K package.json
command line - Unix & Linux Stack Exchange
2016年9月3日 · Ncdu vs du/df. The interface of ncdu is built using ncurses and is interactive. Ncdu is different from df or du. Ncdu just does the one task of reporting the space used by a directory and drill down. On the other hand the df command reports space used by different storage devices.
Finding files that use the most disk space - Unix & Linux Stack …
Is it possible to list the largest files on my hard drive? I frequently use df -H to display my disk usage, but this only gives the percentage full, GBs remaining, etc. I do a lot of data-intensive calculations, with a large number of small files and a very small number of very large files.
Discrepancy between "du" and "df" - Unix & Linux Stack Exchange
2020年3月23日 · When you delete a file that is held open by an app the OS still sees the file size in df as the file is still open in memory. Here is some documentation I wrote for a co worker that should get you what you need. Truncate large open files. You have deleted files to free space but space not free afterward. Now df -lah and du -lah show different sizes