1
1

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 3 years have passed since last update.

Linux上のサイズの大きなファイルをコマンドラインから探す

Last updated at Posted at 2020-11-07

Linux上のサイズの大きなファイルをコマンドラインから探す

カレントディレクトリ配下の100MB以上のファイルを探す
$ find ./ -size +100M | xargs ls -lh

サイズ大-->小の順番にソート(昇順ソート)
$ find ./ -size +100M | xargs ls -lhS

サイズ小-->大の順番にソート(降順ソート)
$ find ./ -size +100M | xargs ls -lhSr

カレントディレクトリの各ファイルのサイズを出力する(ディレクトリ含む)
$ ls | xargs du -sh

カレントディレクトリのサイズを出力する
$ du -sh
1
1
0

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?