7

I am a beginner with Linux / Ubuntu, and I'm trying to remove / delete a file.

The specific is a wallet I created in Electrum to import a paper wallet; I can see the wallet in the file list but can't delete it.

I do understand that one uses the rm command in the Terminal, but I am not sure how to word the actual command. The file I'm trying to delete is home/duncan/.electrum/wallets/import key, but but if I type that into the Terminal it is rejected - i.e.

rm home/duncan/.electrum/wallets/importkey

is rejected.

  • Try rm -rf home/duncan/.electrum/wallets/import key – Alex Lowe Jan 4 '16 at 13:05
  • Try rm -rf home/duncan/.electrum/wallets/import\ key – Philippe Gachoud Jan 4 '16 at 13:10
  • 7
    Both of you are missing the / before home. – Rinzwind Jan 4 '16 at 13:11
15

Mind the space! That tells "rm" there will be a 2nd file after the 1st one.

And since it is 1 file you need to take care of the space. What will work:

rm /home/duncan/.electrum/wallets/"import key"

or

rm /home/duncan/.electrum/wallets/import\ key

by "escaping" the space or

rm /home/duncan/.electrum/wallets/import{tab}

(keep hitting tab til it shows the file name).

/home/duncan can be abbreviated by ~ (ie. rm ~/.electrum/wallets/"import key")


The file name was Import_keys. So the shorthand version for Duncan:

rm ~/.electrum/wallets/Import_keys

No need for "'s. The capital I probably was the culprit.

  • Thank you very much - I do appreciate your kind help and the time you have given up to help. MUCH appreciated! Duncan (Scotland) – Duncan Jan 4 '16 at 13:17
  • 1
    @Duncan As you're new to the site, if you are happy with this answer then please accept it by clicking the grey tick to the left of it. – Carl H Jan 4 '16 at 13:26
  • Thanks - did not know about that Carl - will do after this. After replying to you I found that I can't get it to work - get this message: – Duncan Jan 4 '16 at 13:28
  • ..... get this message: "rm: cannot remove ‘home/duncan/.electrum/wallets/import_keys/import_keys’: No such file or directory". Can you suggest what I am doing wrong? – Duncan Jan 4 '16 at 13:29
  • 1
    @Duncan - You would be well served to go through a few bash tutorials or search up Ubuntu Terminal tutorials on youtube. It won't take long for you to get comfortable at the terminal. Good luck and have fun! – joel Jan 4 '16 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.