rm ./#md_6b.log.1#
sudo rm ./#md_6b.log.1#
ActuallyIt's a bad idea to use special characters, like #, as the first character in a file name. The easiest method to delete this file is to preface the file name with ./ (dot slash), like this:
Code:rm ./#md_6b.log.1#
If that gives you a Permission Denied error, then use sudo:
Code:sudo rm ./#md_6b.log.1#
Of course you need to be inside the directory with the file you want to delete when you give the appropriate rm command above. This article gives more information about special characters in file names.
#filename.ext#
is typical of a backup file automatically created by emacs. So if you open a file in emacs, edit it and then quit without saving, it often creates a backup file that has # characters at the start/end of the original filename. And it is possible that other software might create similarly named backup files.rm /path/to/\#md_6b.log.1\#
rm "/path/to/#md_6b.log.1#"
sudo
.sudo rm "/path/to/#md_6b.log.1#"
/path/to/
with the actual path to the file you want to delete.thanks for the solutionActually#filename.ext#
is typical of a backup file automatically created by emacs. So if you open a file in emacs, edit it and then quit without saving, it often creates a backup file that has # characters at the start/end of the original filename. And it is possible that other software might create similarly named backup files.
RE: filenames containing special characters
You should either escape any special characters with backspaces, or enclose them in double quotes.
So in order to remove the temporary files in the terminal, you could use backspaces to "escape" special characters in the file-name like this:
OR using double quotes:Bash:rm /path/to/\#md_6b.log.1\#
Bash:rm "/path/to/#md_6b.log.1#"
And as pointed out by @Old Tom Bombadil , if you require root permissions in order to remove the files, you should usesudo
.
e.g.
Bash:sudo rm "/path/to/#md_6b.log.1#"
Also note:
In all of the above examples, substitute/path/to/
with the actual path to the file you want to delete.