The road to mathematics-the basic technology of Distributed Computing-linux/unix (4)

Source: Internet
Author: User

PWD Displays the current directory, ls view files under the directory, CD into the folder

-bash-4.2$ pwd

/home/myhaspl
-bash-4.2$ ls
ABC hadoop-2.4.1 mydoclist mypylst mypylsts numpy
Abd hadoop-2.4.1-src.tar.gz myl2 Mypylst1 myrun pypy-2.3.1-src
Error.log hadoop-2.4.1.tar.gz mylist mypylst2 myse SE
-bash-4.2$ CD NumPy
-bash-4.2$ ls
Bento_build.txt BUILD INSTALL.txt numpy runtests.py test_commit
Bento.info compatibility LICENSE.txt pavement.py setupegg.py THANKS.txt
Branding dev_readme.txt manifest.in README.txt setup.py Tools
Bscript Doc mydoclist release.sh site.cfg.example Tox.ini

-bash-4.2$

mkdir Building a Directory

RM Delete File r parameter indicates recursive deletion, along with subdirectories and their inclusion delete, f parameter indicates force delete

-bash-4.2$ mkdir ABCD
-bash-4.2$ CD ABCD
-bash-4.2$ mkdir ABCD1
-bash-4.2$ CD ~
-bash-4.2$ ls
ABC hadoop-2.4.1 MYL2 MYPYLST2 numpy
ABCD hadoop-2.4.1-src.tar.gz mylist mypylsts pypy-2.3.1-src
Abd hadoop-2.4.1.tar.gz mypylst Myrun SE
Error.log mydoclist Mypylst1 Myse
-bash-4.2$ RM-RF ABCD
-bash-4.2$ ls
ABC hadoop-2.4.1 mydoclist mypylst mypylsts numpy
Abd hadoop-2.4.1-src.tar.gz myl2 Mypylst1 myrun pypy-2.3.1-src
Error.log hadoop-2.4.1.tar.gz mylist mypylst2 myse SE
-bash-4.2$


Vim Editor

$vim

After startup, the display interface


Simple operation, press I to enter insert mode, enter characters

Then press the ESC key to exit Insert mode, enter: wq! Hello, with "Hello" as the file name, save to exit.

-bash-4.2$ Cat Hello

Hello

world!

-bash-4.2$

Vim common operation Keys


Vim

Shortcut keys:

Ctags

Filename

Do index

Cursor Movement:

Four Directions

K

H

0

L

J

Ctrl+f,

Ctrl+b

Page DOWN, PAGE up

Ctrl+d,

Ctrl+u

Half page DOWN, half page up

$

Move end of line

0

Move beginning

W

Move the next word

B

Move to the previous word

Gg

Jump to the beginning of the document

G

Jump to the end of the document

%

Jumps to the matching brackets ("{

}""[]""()")

Ctrl+i,tab

Skip to Next

Jump

Point

Ctrl+o

Skip to Previous

Jump

Point

23GG,

23G,

: 23

Jump to the first

23

Yes

Ctrl+i,

tab

Jumps to the next hop point (jump

Point)

Ctrl+o

Jump to last Hop point

Find Replacements:

#

Find the entire keyword backwards from the cursor

*

Find the entire keyword from the cursor forward

g#

Find keywords backwards from the cursor

g*

Find keywords from the cursor forward

Fx,tx,fx,tx

Find characters in current line

Find Replacement Examples:

:

S/search/replace

:

S/if/since

Replace the next "If" with "Since"

:

%s/if/since

Replace All "If" with "Since"


Word boundaries:

Specify word boundaries:

\<

And

\>

Such as:

/\<d[a-z]*an\>

Match to

D

Start with an arbitrary lowercase letter in the middle to

An

End of

Words

/\$[0-9]*\. [0-9] [0-9]

Match Lookup

$XX ... x.xx

That's the number, and there's only two little bits.

Number of

Common editing commands:

A

I

After the cursor is inserted,

Insert before the cursor

Dd

Delete a row

Cc,s

Delete a row and enter

Insert

Mode

Dw

Delete a word

cw

Delete a word and enter it

Insert

Mode

X,dl

Delete a character

S,cl

Delete a character after entering

Insert

Mode

P

Paste

Xp

Swap two characters

Ddp

Swap two lines

Y

Copy

Yy

Copy a row

U

Undo

Ctrl+r

Redo

.

Repeat last Modification

Ctrl+r

Redo

.

Repeat last Modification



The road to mathematics-the basic technology of Distributed Computing-linux/unix (4)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.