LoginSignup
6
6

More than 5 years have passed since last update.

lsコマンドで単位を揃えて(メガバイト、ギガバイト単位などで)表示させる方法

Posted at

方法

  • MiB単位(2^20)
$ ls -l --block-size=M
  • MB単位(10^6)
$ ls -l --block-size=MB
  • GiB単位(2^30)
$ ls -l --block-size=G
  • GB単位(10^9)
$ ls -l --block-size=GB

注意点

端数(小数点以下)は切り捨てられます。

参考

How do I make ls show file sizes in megabytes?

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