Vi, write something then try to save & quit.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Vi, write something then try to save & quit.
# 1  
Old 03-03-2009
Vi, write something then try to save & quit.

If I'm in Vi, write something then try to save & quit. :wq I get: "myvifile" "myvifile" E212: Can't open file for writing Press ENTER or type command to continue It won't let me save... Is it because other users on the network have access to the file also? Or I don't have permission to save? Thanks 8)
# 2  
Old 03-03-2009
Probably because you do not have write permissions in that directory.

Try this at the command line. You should have a similar problem:

Code:
touch fakeFile

If it creates a zero-byte file, then something else is wrong. If it completely fails to create a file, then it's definitely a write-permissions issue.
# 3  
Old 03-03-2009
Quote:
Is it because other users on the network have access to the file also? Or I don't have permission to save? Thanks 8)
How do you want us to answer with the information given??
We dont know:
1 - Who you are at the time on the box with issue
2 - the file permissions
3 - The file owner/group
4 - The directory you are in at the time of issue, is it NFS?
# 4  
Old 03-03-2009
touch fakefile touch: cannot touch `fakefile': Permission denied /home/cnet146
I emailed the Admin.
SmilieThanks
# 5  
Old 03-03-2009
Ah, so it was a new file, you werent editing an existing...
# 6  
Old 03-03-2009
I was in the general directories,
not my own.
I was able to edit/create, after switching to my
directories
/home/juma
Thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Script to ZIP/SAVE & then DELETE Log file & send a mail conformation for any error

ENVIROMENT Linux: RHEL 6.4 Log Path: /usr/iplanet/servers/https-company/logs Log Format: user.log.03-15-2015 I have log4j log rotation enabled rotating files on a daily basis. The rotated logs are NOT compressed & are taking up too much space. I need a script that will run daily that... (1 Reply)
Discussion started by: admin_job_admin
1 Replies

2. Shell Programming and Scripting

Opening a file in vi and automatically save and quit this file using shell script

Hi friends, In my shell script, I want to open a file using vi editor. After opening the file in vi, I want to save and quit this file automatically.... all through shell script. the code segment is: ------------------------------------------------------------ cd ~/netfpga/projects/scone/sw/... (2 Replies)
Discussion started by: sachinteotia
2 Replies

3. UNIX for Dummies Questions & Answers

Write (save time) Permission set

When am saving a file using my username in Linux environment, the file permission granted is rw-r--r-- I have to manually change the permissions using chmod command. How do i write it to the disk as rw-rw-r while saving my file. (6 Replies)
Discussion started by: Avishek_rc1
6 Replies

4. Red Hat

Need Script to ZIP/SAVE & then DELETE Log file & DELETE ZIPS older than 12 months

ENVIROMENT Linux: Fedora Core release 1 (Yarrow) iPlanet: iPlanet-WebServer-Enterprise/6.0SP1 Log Path: /usr/iplanet/servers/https-company/logs I have iPlanet log rotation enabled rotating files on a daily basis. The rotated logs are NOT compressed & are taking up too much space. I... (7 Replies)
Discussion started by: zachs
7 Replies

5. Shell Programming and Scripting

How to write If statement using && and operator in Unix

Hi What is the syntax for if statement using && and || operator? if && ] || here its giving me an error to this if statement any suggestion?? (2 Replies)
Discussion started by: Avi
2 Replies

6. Shell Programming and Scripting

sed - write remaining input and quit?

I'm an infrequent user of sed. I searched this and other forums and read quite a bit of the O'Reilly book for an answer without luck. In my script I want sed to write the remainder of the input file and quit if it matches a pattern. e.g /Google/ Does anyone have an answer? thank. (5 Replies)
Discussion started by: lyledp
5 Replies

7. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

8. Shell Programming and Scripting

"Write" - how to quit by press enter

I need to make Bash script. It has one parameter - user ID. If this user is online you can write him a message with "write" program, but only one line. After pressing ENTER "write" program should quit. Normally when you run "write" you can write next line after pressing ENTER and you can quit... (0 Replies)
Discussion started by: Eriknem
0 Replies
Login or Register to Ask a Question