「*」というファイルを削除する方法は? [コピー]

「*」というファイルを削除する方法は? [コピー]

私のものではなく、誰かが逃げたdd if=/dev/zero of=* iflag=fullblock,count_bytes count=200Gので、200GBのファイルが私のファイルシステムのスペースを占めています。実行せずに削除する方法はありますかrm *

ベストアンサー1

以下では、「*」というファイルを作成して削除します。 「\」は bash に次の文字を解釈せずに文字通り使用するように指示するため、Unix の人々はしばしば「エスケープ文字」と呼びます。

[ahill@infprd-sftp01 ~]$ ls -l
total 0
[ahill@infprd-sftp01 ~]$ touch test1
[ahill@infprd-sftp01 ~]$ touch \*
[ahill@infprd-sftp01 ~]$ ls -l
total 0
-rw-rw-r-- 1 ahill ahill 0 Sep 20 16:28 *
-rw-rw-r-- 1 ahill ahill 0 Sep 20 16:28 test1
[ahill@infprd-sftp01 ~]$ rm \*
[ahill@infprd-sftp01 ~]$ ls -l
total 0
-rw-rw-r-- 1 ahill ahill 0 Sep 20 16:28 test1

おすすめ記事