Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to edit a file on a UNIX Server Post 302827711 by vinil on Sunday 30th of June 2013 01:25:48 PM
Old 06-30-2013
Hi
View/Edit a file in unix is quite easy indeed.You may like the following to use
1 cat <file_name>
2 cat><filename>
3 vi <filename>

Note that 1st option is to VIEW file only.You will not be able to write in this mode.
2nd and 3rd options make you enable to edit a file.
Be cautious when you edit a file using 3rd option as it may need a bit more knowledge about VI editor prior to use.
But there is no harm in using the 2nd option mentioned above
thanks .
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to edit large file in unix

hi All, Plz let me know how to edit a file with 2000000 records. each record contains with 40 field seperated by |. i want modify 455487 record, but i am uable to edit this large file using vi editor in unix. plz let me know how to modify this file. Thanks in advance. -Bali Reddy (3 Replies)
Discussion started by: balireddy_77
3 Replies

2. HP-UX

Transfer file from local unix server to remote server

want to remove the thread thanks (2 Replies)
Discussion started by: indira
2 Replies

3. Shell Programming and Scripting

Transfer file from local unix server to remote server

want to remove this thread. thanks (2 Replies)
Discussion started by: indira
2 Replies

4. UNIX for Dummies Questions & Answers

To copy a file from one unix server to another unix server through scripts

I am getting the fallowing error when i am trying to execute the scp commomd in shell script warning: You have no controlling tty. Cannot read confirmation. warning: Authentication failed. Disconnected; key exchange or algorithm negotiation failed (Key exchange failed.). scp2: warning: ssh2... (1 Reply)
Discussion started by: manit
1 Replies

5. Shell Programming and Scripting

File transfer from one server to another server in unix

Hi, Can anyone help me. I am a new user in unix. I want to transfer (ftp) a file from one unix server to another server. Kindly help me. more details: server 1 file_name a.lst path: :/temp server 2 path : /develp/temp Thanks, Raj, (2 Replies)
Discussion started by: easterraj
2 Replies

6. Shell Programming and Scripting

Perl: Sending file from UNIX server to Windows server

I'm trying to write a Perl script where a file from a UNIX server box connects to a Windows server box and copies that file into the Window box. The main problem I have right now is that whenever I try to connect to the Windows box, the connection is refused. The error message that always pops... (2 Replies)
Discussion started by: kooshi
2 Replies

7. Shell Programming and Scripting

Shell: uploading file from UNIX server to sharepoint server

Is it possible to upload a file from unix server to sharepoint server through shell or perl scripting. I have the sharepoint link where it needs to be uploaded. Could you please share your views on this ? (0 Replies)
Discussion started by: scriptscript
0 Replies

8. Shell Programming and Scripting

File Transfer from Window server to UNIX and UNIX to UNIX

Dear All, Can someone help to command or program to transfer the file from windows to Unix server and from one unix server to another Unix server in secure way. I would request no samba client. (4 Replies)
Discussion started by: yadavricky
4 Replies

9. Shell Programming and Scripting

Update/Download file from FTP server to UNIX Server

HI Guys, I want to download files from FTP Server to my Unix server. I have tried , buy No Luck . Below Command i have tried. 1-Wget - Error "wget' not found" 2.ftp -n $HOST ...Not Working. 3.scp -i ftp://user:passowrd@hostname:21/ran/on/test.txt Any Suggestion (2 Replies)
Discussion started by: pareshkp
2 Replies

10. Solaris

I can't edit a txt file shared from Window server to Solaris

Hello, I'm working with Solaris and I need to share files between Windows Server 2012 and Solaris through an authentication with an Active Directory user, where Windows Server is the "main server". All was going good, until after see the WS files and I tried to open one and modify it, but I cannot... (1 Reply)
Discussion started by: QeratD0
1 Replies
EX(1)							      General Commands Manual							     EX(1)

NAME
ex, edit - text editor SYNOPSIS
ex [ - ] [ -v ] [ -t tag ] [ -r ] [ +command ] [ -l ] name ... edit [ ex options ] DESCRIPTION
Ex is the root of a family of editors: edit, ex and vi. Ex is a superset of ed, with the most notable extension being a display editing facility. Display based editing is the focus of vi. If you have not used ed, or are a casual user, you will find that the editor edit is convenient for you. It avoids some of the complexi- ties of ex used mostly by systems programmers and persons very familiar with ed. If you have a CRT terminal, you may wish to use a display based editor; in this case see vi(1), which is a command which focuses on the display editing portion of ex. DOCUMENTATION
The document Edit: A tutorial (USD:14) provides a comprehensive introduction to edit assuming no previous knowledge of computers or the UNIX system. The Ex Reference Manual - Version 3.7 (USD:16) is a comprehensive and complete manual for the command mode features of ex, but you cannot learn to use the editor by reading it. For an introduction to more advanced forms of editing using the command mode of ex see the editing documents written by Brian Kernighan for the editor ed; the material in the introductory and advanced documents works also with ex. An Introduction to Display Editing with Vi (USD:15) introduces the display editor vi and provides reference material on vi. In addition, the Vi Quick Reference card summarizes the commands of vi in a useful, functional way, and is useful with the Introduction. FILES
/usr/share/misc/exstrings error messages /usr/libexec/exrecover recover command /usr/sbin/expreserve preserve command /etc/termcap describes capabilities of terminals ~/.exrc editor startup file /tmp/Exnnnnn editor temporary /tmp/Rxnnnnn named buffer temporary /usr/preserve preservation directory SEE ALSO
awk(1), ed(1), grep(1), sed(1), grep(1), vi(1), termcap(5), environ(7) AUTHOR
Originally written by William Joy Mark Horton has maintained the editor since version 2.7, adding macros, support for many unusual terminals, and other features such as word abbreviation mode. BUGS
The undo command causes all marks to be lost on lines changed and then restored if the marked lines were changed. Undo never clears the buffer modified condition. The z command prints a number of logical rather than physical lines. More than a screen full of output may result if long lines are present. File input/output errors don't print a name if the command line `-' option is used. There is no easy way to do a single scan ignoring case. The editor does not warn if text is placed in named buffers and not used before exiting the editor. Null characters are discarded in input files, and cannot appear in resultant files. 4th Berkeley Distribution October 21, 1996 EX(1)
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy