63
53

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ディレクトリ以下のディスク容量を調べるduコマンド

Posted at

ディレクトリ以下の容量

$ cd /path/to/dir
$ du -sh
1.9M	.

-hオプションは人が読み易い形式(例. 10K 1M)で表示する、の意。

サブディレクトリごと

$ du 
24	./bin
40	./lib/common
112	./lib
96	./pkg
88	./test
320	.

深さ1

$ du -d 1 -h
1.7M	./.git
 12K	./bin
 56K	./lib
 48K	./pkg
 44K	./test
1.9M	.

##詳しい使い方を調べる

$ info du

Webで見るならMan page of DU 辺り。

63
53
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
63
53

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?