ServerWeb service

ssh vi commands to edit files and folders deleted

vi 편집기 가장 많이 사용하는 명령어

vi Editor

Ssh to connect to the server, how to edit the file.

After running ssh

vi / path, and then enter the file name, type

In edit mode you enter i, or enter a change to the input mode.

 

These modified after the file

:w // Save

:wq // Save the edited file and exit

:wq! //Save the file being edited and exit into force (Read-only files are also available)

:q! // Exit without saving the file being edited

 

Deleting files from an ssh

 

rm / path to the file Enterprise // Deleting Files

 

Delete folders

rm -rf / folder name // Delete folders

 

Copy the folder

For example, if you try to copy / usr / src / test folder to / usr / src / abc / folder

 

cp -rf /usr/src/test /usr/src/abc/ 엔터

 

Download and unzip the file in ssh

 

First, specify a folder for download file. For example, if you get down to the / usr / local / src folder

 

cd / usr / local / src enter Enterprise

 

Now and download the file.

 

wget http://Download get file path

 

Extracting

 

tar xvzf filename

 

 

 

 

Tags
Show More

Leave a Reply

Your email address will not be published. Required fields are marked *

Close
Close

Adblock Detected

Please consider supporting us by disabling your ad blocker