1

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#?

3
  • 1
    what about "rm #korpus.txt#" ? The pound sign is nothing magical, just another character.
    – Aganju
    Dec 14, 2015 at 16:50
  • I get rm: missing operand
    – Sandi
    Dec 14, 2015 at 16:54
  • The # needs to be escaped. rm \#korpus.txt\# is what you need to do. @WillP.'s answer did not mention this.
    – Run CMD
    Dec 14, 2015 at 16:56

3 Answers 3

0

rm '#korpus.txt#' solved the problem. The quote marks are necessary for escaping the #. Did not try Class Stackers solution.

0

Some other methods to delete oddly-named files, though less optimal than those previously described, can get you by in a pinch:

  • Careful use of wildcards:

    rm -i ?korpus.txt?

  • Try using filename completion. In bash:

    rm #tab changed to rm \#korpus.txt#

  • Try using a different shell just for the task.

    /bin/tcsh had no issue with rm #korpus.txt#

0

Since you added tag emacs, here is the Emacs way to do it:

In Dired (C-x d):

  1. Type # to flag all such files for deletion (mark D).

  2. Then type x to delete them all.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .