du 1.4 KB

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