時には、誰もがシステム内の大きなファイルをチェックする必要がある。私がよく使う便利なコマンドをいくつか紹介する。Linuxで大きなファイルを簡単に見つけよう。

最初のパターンはこちら:

find /home/ercan/ -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

システム内でファイルサイズが250MBを超える場合:

sudo find /home/ercan/ -type f -size +250000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

結果はこちら:

/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 631M
/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 248M
/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 251M
/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 464M
/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 306M
/home/ercan/Downloads/CentOS-7-x86_64-Minimal-2003.iso: 1.1G
/home/ercan/VirtualBox: 13G