0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Linux][command] ファイルシステム管理_df, du, fsck, e2fsck

Last updated at Posted at 2025-02-08

ディスクの確認

dfコマンド

  • df: disk free
# df [オプション] デバイス名
オプション 英語の由来 説明
(default) disk free ファイルシステム全体のディスク使用量、空き容量を表示
-h human-readable 人間が読みやすい単位(KB, MB, GB)でディスク容量を表示
-i inodes 使用中および空いているiノードの数を表示
-k kilobytes ディスク使用量をキロバイト単位で表示
-m megabytes ディスク使用量をメガバイト単位で表示

duコマンド

  • du: disk usage
# du [オプション] [ファイルまたはディレクトリ]
オプション 英語の由来 説明
(default) disk usage 特定のディレクトリやファイルのディスク使用量を表示
-h human-readable 人間が読みやすい単位(KB、MB、GB)でディスク使用量を表示
-a all 全てのディレクトリとファイルのディスク使用量も表示
-s summarize 合計ディスク使用量のみ表示
-c cumulative 合計ディスク使用量を追加表示
-S separate dirs ディスク使用量にサブディレクトリの容量を含めない
-k kilobytes ディスク使用量をキロバイト単位で表示
-m megabytes ディスク使用量をメガバイト単位で表示

ファイルシステムの確認

fsckコマンド

  • fsck: fail system check
# fsck [オプション] デバイス名 
オプション 英語の由来 説明
(default) fail system check - ファイルシステムの検査を行い、修復が必要な場合は確認を促します。
-t type - ファイルシステムの種類を指定します。
-A All - /etc/fstab に記載されているすべてのファイルシステムをチェックします。
-N No execute - 実際には修復を行わず、実行されるであろうコマンドを表示します。
-a Automatic repair - 自動的に修復
-r Interactive repair - 対話的に修復

e2fsckコマンド

  • e2fsck: ext2 file system check
# e2fsck [オプション] デバイス名
オプション 英語の由来 説明
(デフォルト) ext2 file system check ファイルシステムの検査を行い、修復が必要な場合は確認を促します。
-p preen 問題を自動的に修正します。
-y yes すべての修復確認に対して自動的に「yes」と応答します。
-n no すべての修復確認に対して自動的に「no」と応答します。

Ping-t

df

du

fsck

e2fsck

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?