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] ファイル管理_ファイル削除_rm, rmdir

Posted at

rmコマンド

$ rm [オプション] ファイル名
オプション 由来 説明
(default) remove - 指定したファイルを削除する
-r | -R recursive - ディレクトリとその中身を再帰的に削除する
-f force - 存在しないファイルを無視し、確認なしで強制的に削除する
-i interactive - 削除前に確認を求める

rmdirコマンド

$ rmdir [オプション] ディレクトリ名
オプション 由来 説明
(デフォルト) remove directory - 指定した空のディレクトリを削除します。
-p
--parents
parents - 指定したディレクトリが削除された後、親ディレクトリも空であれば再帰的に削除します。
--ignore-fail-on-non-empty ignore fail on non-empty - 空でないディレクトリを削除しようとした際のエラーメッセージを表示しません。
-v
--verbose
verbose - 削除するディレクトリの名前を詳細に表示します。
--help help - コマンドのヘルプ情報を表示します。
--version version - コマンドのバージョン情報を表示します。

Ping0-t

rm

rmdir

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?