12.21-linux Quotes Series Difference and command line shortcut keys

Source: Internet
Author: User
Tags clear screen

12.21

Linux Quotes series difference and command line shortcut keys

Content:

1. Single-quote double-quote anti-quote Difference

2. Command-line shortcut keys

3. Check If the port is open (5 methods)

4. yum install common tools

5. find-iname

6. Lrzsz

1th Chapter single quotation marks "' Double quotes "" Anti-Quote `` difference1.1 Single quotation marks : The contents of single quotation marks are displayed intact. What you see is what you get, what you eat.

[[email protected] ~]# echo ' $LANG $ (hostname) ' pwd '

$LANG $ (hostname) ' pwd '

1.2 Double quotes: double quotes are similar to single quotes, and special symbols inside double quotes are parsed ( run ) $LANG $ ()

[[email protected] ~]# echo "$LANG $ (hostname) ' pwd '"

en_US. UTF-8 Oldboyedu43-lnb/root

1.3 Anti-quote : "= = = $ () run the inside command first , Show the results on the screen to stay

[[email protected] oldboy]# echo ' $LANG $ (hostname) ' pwd '

$LANG $ (hostname) ' pwd ' Compare

[[email protected] oldboy]# echo "$LANG $ (hostname) ' pwd '"

en_US. UTF-8 Oldboy/oldboy

2nd Chapter linux shortcut keys (command-line actions)

Move cursor

move the cursor to the beginning of this line Ctrl + A

move the cursor to the end of this line Ctrl+e

move the cursor to the right by one word CTRL + Right

Delete (cut) the cursor position to the beginning of the content Ctrl + u

Delete (cut) The contents of the cursor at the end of the line Ctrl + K

paste Ctrl + Y

Other features (command line)

Cancel Ctrl + C (cancel)

Clear Screen Cerl + L ===clear

exit Current User Ctrl + D ===logout

use the last command at the end of the thing ESC +. Point

lock Screen Ctrl + S

unlock Ctrl + Q

Find the command you've knocked before history |grep

find the commands you've used Ctrl + R: →awk-f Ctrl +r Find the next

3rd Chapter add: See if the port is on (sshd) 3.1 Method One: telnet IP3.2 Method Two netstat-lntup|grep3.3 Method Three:ss-lntup|grep3.4 method Four:nmap-p22 10.0.0.201 ( yum installation required) 3.5 method Five:ps-ef|grep

4th Chapter Linux Common tools ( yum installation required)

Tree

telnet telnet 10.0.0.201 22

NC NC 10.0.0.201 22

Nmap Nmap-p22 10.0.0.201

Lrzsz Windows and Linux Bridges

Dos2unix

Rpm-qa See if the software is installed

RPM-IVH Package . RPM RPM installation software

4.1 Add: Sed-i.bak 's#oldboy#old girl#g'oldboy.txt

-i.txt First backup the source file, in the content of the source file to modify

4.2 DNS configuration file

Peerdns=yes Network card configuration file first reason

resolv.conf Immediate effect

5th Chapter find-iname Find is case insensitive

Find/oldboy-type F -iname "oldboy "

[email protected] oldboy]# Touch Wangzijuan Wangzijuan Wangzijuan

[email protected] oldboy]# find-type f-name "Wangzijuan"  

./wangzijuan

[Email protected] oldboy]# find-type f-iname "Wangzijuan"

./wangzijuan

./wangzijuan

./wangzijuan

5.1 tar command

Create a compressed package using relative paths as much as possible

6th Chapter zip/unzip Linux and Windows support Bridges 6.1 Create zip- format compression package zip oldboy.txt.zip oldboy.txt

extract zip- format compression package Unzip Oldboy.txt.zip

6.2 Windows Upload files to Linux

1. Yum Install lrzsz-y

rz Enter in Windows Select File default upload to linux current directory

2. drag (may not succeed)

6.3 linux download files to Windows

1. se file name Enter select windows storage path


12.21-linux Quotes Series Difference and command line shortcut keys

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.