6
5

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.

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?