Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been having this weird problem with typing commands into gnome-terminal. If the command takes up multiple screen lines and I use any backspaces and the stars are in proper alignment the command becomes garbled but is echoed back fine. I typed and was echoed this:

sudo dd if=debian-6.0.5-amd64-businesscard.iso of=/dev/sdb

however that command returned this:

sudddd: command not found

curiously my history contained this:

sudddd o if=debian-6.0.5-amd64-businesscard.iso of=/=/dev/sdb

These garbled commands almost impersonate my intended command. Really really annoying. Also you may note how dangerous this becomes when using sudo. I don't know if anyone has had similar issues and couldn't find anything while googling.

share|improve this question
    
If you are trying to make an iso from disk, you don't need to use sudo, and you've got the dd/if the wrong way around- see my article on dd/if and isos: askubuntu.com/questions/165620/how-do-i-make-an-iso-from-a-disc/… –  user76204 Jul 20 '12 at 17:08

1 Answer 1

Have modified your bash prompt, PS1? what is its current value set to? If you have bytes that don't add to the length of the prompt, such as terminal escape sequences, and fail to enclose them in \[ \], bash will think the prompt is longer than it is, and lines will wrap around incorrectly. See http://mywiki.wooledge.org/BashFAQ/053

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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