Why can't I save a VI file after entering data?


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers Why can't I save a VI file after entering data?
# 15  
Old 02-10-2010
In Ubuntu one does not normally need the root password because you use sudo instead, so my mentioning root password applies to other industry Unix es.
In Ubuntu your account is an administrator account by virtue of being in the admin group. My account in Ubuntu is in the following groups:
tony@laptop:~$ groups
tony adm dialout cdrom plugdev lpadmin admin sambashare newgroup
tony@laptop:~$

On the ~/.exrc file question you either edit it using vi to add the "set number" line OR you use the echo method to add it to the end of the file, either way if there was no ~/.exrc file presnet before then it should only contain the line:
Code:
set number

# 16  
Old 02-11-2010
but to use some commands... i am getting denied with permissions. why is it so if the user account holds the admin privilages.

---------- Post updated at 12:37 AM ---------- Previous update was at 12:34 AM ----------

:set number works fine. but it gives line numbers only for current session. to have the line numbers every session, I need to edit .exrc

what is .exrc is it a file that can be opened with vi and can be edited? if so where it is located?

cos' i tried to open it with

vi *.exrc and added the lines... but it is not saved.
# 17  
Old 02-11-2010
.exrc is located in your home directory. This is the directory where you are placed when you first login.
The ~ (tilde) character is a short form for "my home directory", so

Code:
vi ~/.exrc

will edit the .exrc in your home directory whether you are in it or not.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Get a data and save

If I have a A.log 1 Air Flow Monitor : 34.070 Degrees C 2 Air Flow Monitor : 41.730 Degrees C 3 Air Flow Monitor : 35.340 Degrees C 4 Air Flow Monitor : 33.370 Degrees C 5 Air Flow Monitor : 36.770 Degrees C 6 Air Flow Monitor : 45.910 Degrees C 7 Air Flow Monitor ... (1 Reply)
Discussion started by: sabercats
1 Replies

2. UNIX for Advanced & Expert Users

How to save a data of a file into a variable?

My requirement is to read a column data from a file & save it in a variable for each row & process it. I am using the below code- Leadlines="$TGTFILE/Error.txt">>$log_file while read line do id = ` echo $line | cut -d "," -f1 ` email = ` echo $line | cut -d "," -f2 ` ----------- done My... (2 Replies)
Discussion started by: saga20
2 Replies

3. Shell Programming and Scripting

Open Text file input data and save it.

Hi Guys, I have blank file A.txt I will run the script xyz.sh First i want to open a.txt file... Now i will enter some data like XYZ ABC PQR .. Save it and keep continue my script.... END of my script. Thanks (1 Reply)
Discussion started by: asavaliya
1 Replies

4. Shell Programming and Scripting

Get Permissions and save to data

Hi all; I have the following code which gives me kind of what I need: #!/usr/bin/perl use Fcntl ':mode'; # if ($ARGV ne "") { $filename = $ARGV; } else { print "Please specify a file!\n"; exit; } # if... (2 Replies)
Discussion started by: gvolpini
2 Replies

5. Solaris

Login delay after entering id (40 secs) same after entering pw

Hi all, I have just installed Solaris 10 on an old Fujitsu Primepower 650 which has been wiped clean. I haven't installed anything apart from the OS yet, so the machine is 99% idle. I get long delays when logging in, first after entering the id then another long delay after entering a valid... (8 Replies)
Discussion started by: longjon
8 Replies

6. Shell Programming and Scripting

How to add data from 2 input files and save it in 1 output file

Hi, i have 2 input files which are file1.txt and file2.txt. I need to extract data from file1.txt and file2.txt and save it in file3.txt like example below:- File1.txt ID scrap1 Name scrap1 start 1 end 10 ID scrap2 Name scrap2 start 11 end ... (4 Replies)
Discussion started by: redse171
4 Replies

7. Shell Programming and Scripting

perl-data from file save to multidimensional array

i have a file,like 1 3 4 5 6 7 8 9 i want to save it into an array. and then i want to get every element, because i want to use them to calculate. for example: i want to calculate 1 + 3. but i cannot reach my goal. open (FILE, "<", "number"); my @arr; while (<FILE>){ chomp;... (1 Reply)
Discussion started by: pp-zz
1 Replies

8. Shell Programming and Scripting

select data from oracle table and save the output as csv file

Hi I need to execute a select statement in a solaris environment with oracle database. The select statement returns number of rows of data. I need the data to be inserted into a CSV file with proper format. For that we normally use "You have to select all your columns as one big string,... (2 Replies)
Discussion started by: rdhanek
2 Replies

9. Shell Programming and Scripting

Data fetched from text file and save in a csv file

Hi i have wriiten a script which fetches the data from text file, and saves in the output in a text file itself, but i want that the output should save in different columns. I have the output like: For Channel:response_time__24.txt 1547 data points 0.339 0.299 0.448 0.581 7.380 ... (1 Reply)
Discussion started by: rohitkalia
1 Replies

10. Filesystems, Disks and Memory

Can ZFS Save my Data

Hello, Our RAID and server recently crashed and we are trying to recover our data. The problem appears to be that the Veritas File System/Logical Volume Manger became corrupt on our RAID. We are down to our last option, which is to run some Veritas commands that "may" result in data loss. ... (1 Reply)
Discussion started by: stringman
1 Replies
Login or Register to Ask a Question