Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-10-2010, 11:47 AM   #1
ramya victor
LQ Newbie
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
unable to save and exit from vi editor

i have done something while changing permission in vi editor. now when i open any file, i am not able to save and exit from it. when i type esc+shift:wq after opening a file. it says cant open file in write mode. please tell what to do? am a new user to fedora 9 and dont know much about it. please help
Old 11-10-2010, 12:11 PM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
*any* file? The file is probably just not writable. Or, you don't own the file. Or, the disk is full.
Old 11-10-2010, 12:23 PM   #3
Senior Member
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
Report here the results of two commands:


ls -l

In the command above -l is minus lowercase L.
Old 11-20-2010, 12:52 PM   #4
ramya victor
LQ Newbie
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
when i open *.pl files i get this error. i can open all files from my root account but from my local login account i am not able to open perl files. but i am able to open *.c, *.php etc files.

Last edited by ramya victor; 11-20-2010 at 12:55 PM.
Old 11-20-2010, 01:03 PM   #5
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
Have you checked the permissions as per the previous suggestions?

From a shell prompt, logged in with your standard user account type the following and post the results:
ls -l
Please replace with the file you are experiencing problems with
Old 11-20-2010, 01:10 PM   #6
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Looks like vi permissions are messed up. I am not that good with vi but I think you have messed with the virc or vi.rc. Hopefully you do not get these errors when logged in as root.
Some options I have are:
1. try a different editor for the timebeing nano or emacs should be there.
2. Create a new user and see if he is able to edit all files.
3. Reinstall vi - if you have the cd/dvd very simple logic can help you reinstall - else you would need to look the rpm or the source code up.
Lesson: Make sure you back up system generated files - specially when you are root.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Save Visudo and exit acbenny Linux - General 7 05-05-2011 01:33 PM
exit text editor donadoni Linux - Newbie 8 06-03-2009 07:19 AM
How to exit and save (or just to exit) inside a "make config" running command? scrat75 Linux - Kernel 6 09-05-2008 05:02 PM
Run program on Linux Startuo (Save on exit won't work!) ziphem Linux - Newbie 1 01-13-2005 08:01 AM
http config program doesnt save and exit!!! benrose111488 Linux - Software 0 06-09-2004 09:02 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration