LoginSignup
3
2

More than 5 years have passed since last update.

lsコマンドでデータサイズをK, MB, GB表示する

Last updated at Posted at 2018-02-19

mysqlのバックアップを日毎に取っていた時にデータサイズの計算で迷ってしまったが、
lsコマンドのオプションでk, MB, GBなど人によって読みやすい表記にできる

$ ls -lh

manのDescriptionを見てみると-hhuman-readableという意味のようだ

man ls

-h, --human-readable
    with -l, print sizes in human readable format (e.g., 1K 234M 2G)

-l use a long listing format
3
2
2

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
3
2