LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   editing a file in command line during ssh session...need advise! (https://www.linuxquestions.org/questions/suse-opensuse-60/editing-a-file-in-command-line-during-ssh-session-need-advise-450131/)

reddog1 05-31-2006 02:16 AM

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 !

acid_kewpie 05-31-2006 02:32 AM

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...

reddog1 05-31-2006 10:03 AM

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.

shshjun 05-31-2006 10:15 AM

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.

reddog1 05-31-2006 10:31 AM

thank you, googling for a tutorial now:D

slackhack 05-31-2006 10:39 AM

Quote:

Originally Posted by reddog1
thank you, googling for a tutorial now:D


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

reddog1 05-31-2006 11:52 AM

Quote:

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

huh, very cool:D thanks !!

acid_kewpie 05-31-2006 03:43 PM

you'd also benefit with a vi cheatsheet. my favourite is the gentoo offering: http://www.gentoo.org/doc/en/vi-guide.xml

reddog1 05-31-2006 10:09 PM

thanks acid, i saved that link for my favorites to refernce later,

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

thanks again !!


All times are GMT -5. The time now is 09:45 PM.