cancel
Showing results for 
Search instead for 
Did you mean: 

vi command does not function

Former Member
0 Kudos

I would like to edit an file on unix but I can not do it with "vi" editor. When I open the file it is not wrapped and it has some strange characters.

Actually I even can not exit from file when opened with "vi".

When using "cat" or "tail" I do not have problems view-ing file, but I can not edit with this commands.

What should I do to edit the file?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This probably has to do with the terminal settings that are set for vi. Have you tried editing with pico or vim? Some times you can use those in place of vi (if there is not a symbolic link from vi to vim).

Reference: [Fix your vi terminal type|http://www.eng.hawaii.edu/Tutor/vi.html#before]

- J. Haynes

Answers (3)

Answers (3)

Former Member
0 Kudos

Is there enough memory on the disk available? VI creates a temporary file at first and when there is unsufficient memory available you may run into an error. Just check it with 'df -h'.

Can you post your environmental data?

Regards

André

Former Member
0 Kudos

The file was created by <SAP-SID>adm user (I do not know how as it was not me to create the file).

However I can not edit file with root(I do not have such authorisation). I guess your answer could be helpfull ( but I can not try it)

Is there something else anyone can suggest

former_member204746
Active Contributor
0 Kudos

what is the name of this file? not all files are editable, especially those that are in binary format such as executables or library files.

Former Member
0 Kudos

Hi,

By which user are you trying to edit the file?

Try editing the file with root user.

Regards