du 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .TH DU 1
  2. .SH NAME
  3. du \- disk usage
  4. .SH SYNOPSIS
  5. .B du
  6. [
  7. .B -afnqstu
  8. ]
  9. [
  10. .B -b
  11. .I size
  12. ]
  13. [
  14. .I file ...
  15. ]
  16. .SH DESCRIPTION
  17. .I Du
  18. gives the number of Kbytes allocated to data blocks
  19. of named
  20. .I files
  21. and, recursively, of files in named directories.
  22. It assumes storage is quantized in units of 1024 bytes (Kbytes) by default.
  23. Other values can be set by the
  24. .B -b
  25. option;
  26. .I size
  27. is the number of bytes, optionally suffixed
  28. .B k
  29. to specify multiplication by 1024.
  30. If
  31. .I file
  32. is missing,
  33. the current directory is used.
  34. The count for a directory includes the counts of the
  35. contained files and directories.
  36. .PP
  37. The
  38. .B -a
  39. option prints the number of blocks
  40. for every file in a directory.
  41. Normally counts are printed only for contained directories.
  42. .PP
  43. The
  44. .B -f
  45. option ignores errors,
  46. otherwise it stops on the first error.
  47. .PP
  48. The
  49. .B -n
  50. option prints the size in bytes and the name of each file; it sets
  51. .BR -a .
  52. .PP
  53. The
  54. .B -t
  55. option prints, in the format of
  56. .B du
  57. .BR -n ,
  58. the modified time of
  59. each file rather than the size.
  60. If the options
  61. .B -tu
  62. are specified then the accessed time is printed.
  63. .PP
  64. The
  65. .B -q
  66. option prints, in the format of
  67. .B du
  68. .BR -n ,
  69. the QID of
  70. each file rather than the size.
  71. .PP
  72. Finally, the
  73. .B -s
  74. option causes
  75. .I du
  76. to descend the hierarchy as always, but to print only a summary line
  77. for each
  78. .IR file .
  79. .SH SOURCE
  80. .B /sys/src/cmd/du.c