Skip to content

Linux & shell: Disk

3 Linux & shell commands: Disk. Click a command to see what each part does.

Index
3 items
Click a command to see what each part does.

Disk3

  • df -hT; df -iDisk space per filesystem (and inodes)

    What each part does

    1. dfreport filesystem usage
    2. -hhuman-readable sizes
    3. -Tshow the filesystem type
    4. df -iinode usage instead of space. A disk can be "full" on inodes
  • du -sh * | sort -rh | headBiggest items in the current folder

    What each part does

    1. duestimate file/directory space
    2. -sone total per argument
    3. -hhuman-readable sizes
    4. *every entry in the current directory (shell glob)
    5. sort -rhsort human sizes (-h knows 2K < 1G), largest first (-r)
    6. headtop 10
  • du -xh -d 1 <dir> | sort -rh | head -n 15Folder sizes one level deep, same filesystem

    What each part does

    1. -xdon't cross into other mounted filesystems
    2. -hhuman-readable
    3. -d 1only show totals one level below <dir> (same as --max-depth=1)
    4. sort -rh | head -n 15largest 15

My DevOps Playbook by Angelo John Calleja

New runbook

GitHub not connected

Saving is handled by the site: the GitHub token is stored in Cloudflare, not in your browser. Enter the editor password (the EDITOR_PASSWORD secret) to unlock saving in this browser.

Saving commits to gelogrammer/My_DevOps_Playbook. Create a fine-grained token with access to only this repo andContents: Read and write, then paste it here. It is stored only in this browser.

src/content/docs/…