Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just edited a vhost file via command line

sudo vi /srv/.../vhost.conf

After saving and reopening to add something, strange chars where added to the file:

enter image description here

E.g.

AuthName "trac"n

was

AuthName "trac"

before.

Same with AuthUserFile. A ns was added behind it and a path.

Any ideas why this happens and how to avoid it? I also can't remove this chars.

share|improve this question
    
Questions related to vi and so on are better on superuser.com. –  Janne Pikkarainen Aug 5 '11 at 10:39

1 Answer 1

up vote 2 down vote accepted

If your TERM setting is wrong, editors such as vi can give a slightly scrambled display of text due to the use of inappropriate escape codes when redrawing the edited text. Does the problem disappear when you press Ctrl+L or Ctrl+R? Is the problem visible when you cat or head the file after editing?

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.