Filename beginning with left bracket: file cannot be erased.
Kernel 2.6.21.5, Slackware 12.0
Hi: I saved a page from Linuxquestions. It was saved under a filename beginning with '[' (left square bracket). And I now can't delete the file. Unfortunately I cannot send you a screenshot because opening a terminal in the GUI makes ls behave differently. I shall try to describe, assuming the file is in dir '.'. Also let '[SOLVED]foo.html' be the file in question: Code:
$ ls EDIT: my mistake. I got confused. The file has just been erased: 'rm -r [*'. |
For what it's worth, you could also have removed it by escaping the bracket, i.e. "rm \[...".
|
Yes, I tried that too. Only I was trying in the wrong directory! But, as I always have trouble distinguishing regexps from expresions to be interpreted by the shell, your observation is valuable, as I can now apply it as a general rule. Regards.
|
All times are GMT -5. The time now is 09:28 PM. |