LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2015, 02:30 PM   #1
musisi
LQ Newbie
 
Registered: Apr 2015
Posts: 1

Rep: Reputation: Disabled
Angry i want to learn about this command


After creating a file using a vi command and pasted into that file what should i do to go back to home but still under that file name
 
Old 04-02-2015, 02:35 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Welcome to LQ!!!

I am not entirely sure what you are asking for? If you are talking about how you can save and exit in vi then you can do that by pressing ESC key and then :wq + Enter.

If you want to learn more about vi here are the links: http://www.tutorialspoint.com/unix/unix-vi-editor.htm and http://www.yolinux.com/TUTORIALS/Lin...vanced_vi.html
 
1 members found this post helpful.
Old 04-02-2015, 02:35 PM   #3
banshii
LQ Newbie
 
Registered: Oct 2014
Posts: 10

Rep: Reputation: Disabled
So you created a file in some directory.
Then you pasted some text into the file you just created, using the vi editor.

Now what is it you want to do exactly? What do you mean go back home?

If you want to save your changes and exit, hit ESC, then Shift+Z+Z.

Last edited by banshii; 04-02-2015 at 02:37 PM.
 
1 members found this post helpful.
Old 04-02-2015, 04:02 PM   #4
Gerard.M.Frey
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by musisi View Post
After creating a file using a vi command and pasted into that file what should i do to go back to home but still under that file name
Not sure what you mean by going home and being under the filename.

But if you created the file while in the home directory, the file will be saved in the home directory or whichever the current directory you initiated the vi command. .


You can also supply a path to where to save the file. For example

Code:
vi /path to save the file/filename
Or you can specific the path within vi by hitting the ESC key and then typing

Code:
:wq /path to save the file/filename
You can return back home by typing either commands below

Code:
cd ~

Or 

cd

Last edited by Gerard.M.Frey; 04-02-2015 at 04:28 PM.
 
1 members found this post helpful.
  


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
Learn the DD command AwesomeMachine Linux - Newbie 870 02-17-2023 04:21 PM
Learn The DD Command AwesomeMachine Linux - Newbie 1 01-12-2012 12:18 AM
Need to learn command abhi_69 Linux - Newbie 5 07-29-2008 05:45 AM
Learn The DD command AwesomeMachine Linux - Newbie 17 08-17-2006 04:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:13 AM.

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