LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-31-2006, 01:16 AM   #1
reddog1
LQ Newbie
 
Registered: Mar 2006
Location: Chicago, IL. USA
Distribution: SUSE 10.0
Posts: 21

Rep: Reputation: 15
editing a file in command line during ssh session...need advise!


i finally figured out how to edit a file while doing an ssh session to another machine on my local network.

my question is how do i save and close that file after im done editing it? and just return to the normal terminal of the current ssh session. I often get stuck within the file and dont know how to get out of it.

Hope im not being to vauge. thanks in advance for any replies !
 
Old 05-31-2006, 01:32 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yeah that is pretty vague... SSH is utterly irrelevant here, it's just a case of learning how to use the console based text editor, and you've not told us what that is... vi... emacs... nano... pico... joe...
 
Old 05-31-2006, 09:03 AM   #3
reddog1
LQ Newbie
 
Registered: Mar 2006
Location: Chicago, IL. USA
Distribution: SUSE 10.0
Posts: 21

Original Poster
Rep: Reputation: 15
im using vi when attempting to edit the file or files, im only using vi because i didnt know of any others. I happened to pick up on vi while reading through some posts on another forum.
 
Old 05-31-2006, 09:15 AM   #4
shshjun
Member
 
Registered: Nov 2004
Location: del
Distribution: jds
Posts: 88

Rep: Reputation: 15
in vi, type [esc] then ZZ to save and close your file. next time have a short vi tutorial beforehand would help you a lot.
 
Old 05-31-2006, 09:31 AM   #5
reddog1
LQ Newbie
 
Registered: Mar 2006
Location: Chicago, IL. USA
Distribution: SUSE 10.0
Posts: 21

Original Poster
Rep: Reputation: 15
thank you, googling for a tutorial now
 
Old 05-31-2006, 09:39 AM   #6
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 47
Quote:
Originally Posted by reddog1
thank you, googling for a tutorial now

type vimtutor in a terminal. it should give you a tutorial.


>>another good beginner one:
http://www.apmaths.uwo.ca/~xli/vim/vim_tutorial.html

Last edited by slackhack; 05-31-2006 at 09:56 AM. Reason: added link
 
Old 05-31-2006, 10:52 AM   #7
reddog1
LQ Newbie
 
Registered: Mar 2006
Location: Chicago, IL. USA
Distribution: SUSE 10.0
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
type vimtutor in a terminal. it should give you a tutorial.

huh, very cool thanks !!
 
Old 05-31-2006, 02:43 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you'd also benefit with a vi cheatsheet. my favourite is the gentoo offering: http://www.gentoo.org/doc/en/vi-guide.xml
 
Old 05-31-2006, 09:09 PM   #9
reddog1
LQ Newbie
 
Registered: Mar 2006
Location: Chicago, IL. USA
Distribution: SUSE 10.0
Posts: 21

Original Poster
Rep: Reputation: 15
thanks acid, i saved that link for my favorites to refernce later,

i have so many notes , they are coming out my ears.... , but im havin fun !! windows really started to bore me, so i had to move on to something else.

thanks again !!
 
  


Reply



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
logout of X session from a command line interface? pwc101 Linux - Software 10 05-02-2006 12:01 PM
Command Line Image Editing fractal_chaos Linux - Software 8 10-03-2005 05:33 PM
editing XF86Config from command line flum Linux - Newbie 4 09-10-2003 04:12 PM
command line editing eddcrossman Linux - Newbie 7 02-16-2003 07:37 PM
Editing files at command line Goatdemon Linux - Newbie 15 08-12-2002 11:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 12:30 PM.

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