Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Need help Saving an edit to a file in SSH
Old 09-26-2007, 12:55 AM Need help Saving an edit to a file in SSH
Super Talker

Posts: 111
Location: Norfolk, Virginia
Trades: 0
I am trying to install mod_layout on my server, I need to edit the file to do this, i figured out how to edit it but to save it, everywhere says press ctl+x but when I do that it doesn't save it brings up a bunch of options each of which I tried and none of which save the file. Mostly it seems like a bunch of find commands. I scoured the internet for an answer but have come up with none so far. Anyone know what I am talking about?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
aswen001 is offline
Reply With Quote
View Public Profile Visit aswen001's homepage!
 
 
Register now for full access!
Old 09-26-2007, 04:45 AM Re: Need help Saving an edit to a file in SSH
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
ctrl+x ?
Probably you are using nano...

Well, simply, once you have modified your file, press ctrl+x.
It will ask you if you want to save your file (look in the white bar at the bottom).
Quote:
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
Y Yes
N No ^C Cancel
Simply press "y", and it will ask you under what name to save the file. By default, the current file name. Simply press enter, and you are done
Quote:
File Name to Write: df.txt
^G Get Help
N No ^C Cancel
The ^ is the "control" key, fyi.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-26-2007, 11:40 AM Re: Need help Saving an edit to a file in SSH
Super Talker

Posts: 111
Location: Norfolk, Virginia
Trades: 0
Unfortunatley I am not using nano. The server only has vi. and after control X it bring up ^E,^Y,^D,^L,etc. not neccesarily in that order. and control Y after the control X doesn't seem to save. Any other sugggestions? Or am I just doing something horribly wrong?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
aswen001 is offline
Reply With Quote
View Public Profile Visit aswen001's homepage!
 
Old 09-26-2007, 12:02 PM Re: Need help Saving an edit to a file in SSH
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Ok, much easier for me then.

In Vi, you start in command mode.
Put your cursor where you want to do the edit, and press "i" to get into edit mode.
Make your changes, and press "esc" to get back in command mode.

Do every changes you want, and when you are done, get in command mode and do:
Quote:
:w [enter]
to save your file, and
Quote:
:q [enter]
to quit vi.



A quick reference commands (always to type in command mode, and case sensitive):
Quote:

17G [enter] => go to the line nbr 17
/any [enter] => search for the word "any"
:u [enter] => undo
dd [enter] => delete the line under the cursor
G [enter] => goes to the last line of the file
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 09-26-2007 at 12:05 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-26-2007, 01:35 PM Re: Need help Saving an edit to a file in SSH
Ultra Talker

Posts: 483
Trades: 0
Oh vi! For my entire first year at university we were only given access to vi... our lecturer's theory was that if you can use vi, you can use anything and if there's only going to be one editor somewhere, that will be it.

I hated him for making us use that... for about 2 weeks then it was very hard to get me off it
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Old 09-26-2007, 02:44 PM Re: Need help Saving an edit to a file in SSH
Super Talker

Posts: 111
Location: Norfolk, Virginia
Trades: 0
Helpful hint for Mac users that I figured out finally.
ESC does not end instert but ^S does.
Thanks for everone's help I go it squared away now
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
aswen001 is offline
Reply With Quote
View Public Profile Visit aswen001's homepage!
 
Reply     « Reply to Need help Saving an edit to a file in SSH
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17442 seconds with 12 queries