!["*"라는 파일을 삭제하는 방법은 무엇입니까? [복사]](https://linux55.com/image/161031/%22*%22%EB%9D%BC%EB%8A%94%20%ED%8C%8C%EC%9D%BC%EC%9D%84%20%EC%82%AD%EC%A0%9C%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F%20%5B%EB%B3%B5%EC%82%AC%5D.png)
내 것이 아닌 누군가가 도망갔기 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