Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).
-f, --force ignore nonexistent files, never prompt
-i prompt before every removal
-I prompt once before removing more than three files, or
when removing recursively. Less intrusive than -i,
while still giving protection against most mistakes
--interactive[=WHEN] prompt according to WHEN: never, once (-I), or
always (-i). Without WHEN, prompt always
--one-file-system when removing a hierarchy recursively, skip any
directory that is on a file system different from
that of the corresponding command line argument
--no-preserve-root do not treat `/' specially
--preserve-root do not remove `/' (default)
-r, -R, --recursive remove directories and their contents recursively
-v, --verbose explain what is being done
--help この使い方を表示して終了
--version バージョン情報を表示して終了
By default, rm does not remove directories. Use the --recursive (-r or -R)
option to remove each listed directory, too, along with all of its contents.
`-' で始まる名前のファイルを削除するには、例えば `-foo' というファイルなら
こういうコマンドを使いましょう
rm -- -foo
rm ./-foo
ファイルの削除に rm を使った場合、通常はそのファイル内容を復元できてしまう、
ということには留意しておいてください。もしその内容を本当に復元不可能にする
保証を得たければ、shred の利用を考えてみてください。
Report rm bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).
-f, --force ignore nonexistent files, never prompt
-i prompt before every removal
-I prompt once before removing more than three files, or
when removing recursively. Less intrusive than -i,
while still giving protection against most mistakes
--interactive[=WHEN] prompt according to WHEN: never, once (-I), or
always (-i). Without WHEN, prompt always
--one-file-system when removing a hierarchy recursively, skip any
directory that is on a file system different from
that of the corresponding command line argument
--no-preserve-root do not treat `/' specially
--preserve-root do not remove `/' (default)
-r, -R, --recursive remove directories and their contents recursively
-v, --verbose explain what is being done
--help display this help and exit
--version output version information and exit
By default, rm does not remove directories. Use the --recursive (-r or -R)
option to remove each listed directory, too, along with all of its contents.
To remove a file whose name starts with a `-', for example `-foo',
use one of these commands:
rm -- -foo
rm ./-foo
Note that if you use rm to remove a file, it is usually possible to recover
the contents of that file. If you want more assurance that the contents are
truly unrecoverable, consider using shred.
Report rm bugs to bug-coreutils@gnu.org
GNU coreutils home page:
RM(1) RM(1) 名前 rm - ファイルやディレクトリを削除する 書式 rm [オプション] file... POSIX オプション: [-fiRr] GNU オプション (簡略形式): [-dfirvR] [--help] [--version] [--] 説明 rm は指定された file を削除する。デフォルトではディレクトリの削除を行わ ない。しかし -r や -R オプションで指示されると、指定されたディレクト リ 以 下の全ディレクトリツリーが削除される (‘rm -r’ で削除されるディレクト リツリーの深さに制限はない)。 file のパス構成要素の最後が . もしくは .. の場合はエラーになる (‘rm -r .*’ などとやったあとで驚かないようにするた めである)。 -i オプションが与えられた場合、またはファイルが書き込み不可で、標準入力 が 端末であり、かつ -f が指定されていない場合、 rm はユーザーにファイル を削除してよいかを問い合わせる。問い合わせは標準エラーに書き出され、 返 答 は標準入力から読み込まれる。返答が削除を肯定していないものなら、その ファイルは削除されない。 POSIX オプション -f 削除の確認の問い合わせをしない。対話メッセージを出力しない。単に 存在しないファイルによるエラーなら、エラー状態を返さない。 -i 削除の確認の問い合わせをする。 (-f と -i が両方とも指定された場 合、後から指定された方のオプションが有効になる。) -r または -R 再帰的にディレクトリツリーを削除する SVID 詳細 System V インターフェース定義では、現在実行されている実行可能バイナリフ ァイルへの最後のリンクを削除することが禁止されている。 GNU 詳細 削 除できるディレクトリ階層の深さに上限があるという点で (fileutils-3.16 における) GNU 版の実装は間違っている。 (必要ならば、とても深いツリー を 削除するのに ‘deltree’ というユーティリティが使える。) GNU オプション -d, --directory rmdir(2) ではなく unlink(2) によりディレクトリを削除する。アンリ ンクする前にディレクトリを空にする必要はない。このオプションは適 切な権限を持っている場合にのみ機能する。アンリンクすると、削除さ れたディレクトリにある多くのファイルが参照されなくなるので、ファ イルシステムに fsck(8) を適用するのが賢明である。 -f, --force 存在しないファイルを無視する。ユーザーに削除の問い合わせをしない 。 -i, --interactive それぞれのファイルについて、削除の問い合わせをする。返答 が ‘y’ ま たは ‘Y’ で始まっていない場合、そのファイルは削除しない。前に ある --force オプションを無視する。 -r, -R, --recursive ディレクトリの中身を再帰的に削除する。 -v, --verbose 削除する前にそれぞれのファイル名を出力する。 GNU 標準オプション --help 標準出力に使用方法のメッセージを出力して正常終了する。 --version 標準出力にバージョン情報を出力して正常終了する。 -- オプションリストを終了する。 環境変数 変数 LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES が通常の意味を持つ 。 準拠 POSIX 1003.2 に準拠するが、削除できるディレクトリ階層の深さに制限がある 。 注意 このページでは fileutils-4.1 パッケージでの rm コマンドについて説明して い る 。 その他のバージョンでは少し違いがあるかもしれない。修正や追加は aeb@cwi.nl, aw@mail1.bet1.puv.fi, ragnar@ragnar-hojland.com 宛にメイ ル してください。プログラムのバグについては bug-fileutils@gnu.org へ報告し てください。 GNU fileutils 4.1 18 June 2002 RM(1)
RM(1) User Commands RM(1)
NAME
rm - remove files or directories
SYNOPSIS
rm [OPTION]... FILE...
DESCRIPTION
This manual page documents the GNU version of rm. rm removes each
specified file. By default, it does not remove directories.
If the -I or --interactive=once option is given, and there are more
than three files or the -r, -R, or --recursive are given, then rm
prompts the user for whether to proceed with the entire operation. If
the response is not affirmative, the entire command is aborted.
Otherwise, if a file is unwritable, standard input is a terminal, and
the -f or --force option is not given, or the -i or --interac-
tive=always option is given, rm prompts the user for whether to remove
the file. If the response is not affirmative, the file is skipped.
OPTIONS
Remove (unlink) the FILE(s).
-f, --force
ignore nonexistent files, never prompt
-i prompt before every removal
-I prompt once before removing more than three files, or when
removing recursively. Less intrusive than -i, while still giv-
ing protection against most mistakes
--interactive[=WHEN]
prompt according to WHEN: never, once (-I), or always (-i).
Without WHEN, prompt always
--one-file-system
when removing a hierarchy recursively, skip any directory that
is on a file system different from that of the corresponding
command line argument
--no-preserve-root
do not treat ‘/’ specially
--preserve-root
do not remove ‘/’ (default)
-r, -R, --recursive
remove directories and their contents recursively
-v, --verbose
explain what is being done
--help display this help and exit
--version
output version information and exit
By default, rm does not remove directories. Use the --recursive (-r or
-R) option to remove each listed directory, too, along with all of its
contents.
To remove a file whose name starts with a ‘-’, for example ‘-foo’, use
one of these commands:
rm -- -foo
rm ./-foo
Note that if you use rm to remove a file, it is usually possible to
recover the contents of that file. If you want more assurance that the
contents are truly unrecoverable, consider using shred.
AUTHOR
Written by Paul Rubin, David MacKenzie, Richard M. Stallman, and Jim
Meyering.
REPORTING BUGS
Report rm bugs to bug-coreutils@gnu.org
GNU coreutils home page:
コロナウイルスの日ごとの感染者数・死者数をグラフ化してみました。どの国が増加傾向にあり、どの国が終息に向かっているかを視覚化しています。
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa