I am using SSH to another terminal with very limited disk space. upon typing ls
I see a file called #korpus.txt#
. I suspect this file is an emacs buffer, but upon running emacs and trying to kill it with C-x k bufname RET
, it isn't found. How can I remove #korpus.txt#?
Asked
Active
Viewed 9,640 times
1

Gilles 'SO- stop being evil'
- 829,060

Sahand
- 111
- 1
- 3
2 Answers
3
You could run:
rm '#korpus.txt#'
Quoting will prevent your shell from interpreting #
as a start of
comment character.
However, if this file is being held open by some process, deleting it
will do you no good (the space it occupies will not be reclaimed). It
may be best to use fuser
on this file to find out whether it is in
fact open.

dhag
- 15,736
- 4
- 55
- 65
2
You could also run:
rm \#korpus.txt#
Some good information to know before you blow that file away. Pound signs "#" before and after a file, are usually "auto-save" files.

IT_User
- 362
-
This is useful for removing all files that begin with
#
, since you can't use the wildcard character*
in that way with quotes. – Max Candocia Feb 21 '18 at 16:29
rm '#korpus.txt#'
from the command line. Sometimes files with funny characters in their names are better addressed by enclosing their names in''
. – Dec 14 '15 at 16:40kill-buffer
(C-x k
) will not delete a file. You need to usedelete-file
or dired or some other method to delete a file from emacs. The file is probably an autosave file that emacs creates. Search for how to configure autosave to prevent its creation. – jpkotta Dec 15 '15 at 00:28