Thursday, May 2, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1632  / 2 Years ago, tue, april 5, 2022, 11:01:48

I just discovered that I can actually created a file named *.txt in Ubuntu.



Suppose I have a.txt b.txt and *.txt in my current directory.



How can I delete the third one using terminal? (rm *.txt will delete all)


More From » command-line

 Answers
3

You need to either escape or quote the wildcard:



rm '*.txt'
rm *.txt

[#27962] Tuesday, April 5, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
izecaptur

Total Points: 113
Total Questions: 102
Total Answers: 114

Location: Northern Mariana Islands
Member since Fri, Jan 15, 2021
3 Years ago
;