Linux Common commands Summary (Pwd,echo,history,nano)

Source: Internet
Author: User

1. pwd : Outputs the current working directory

command format: pwd [OPTION] ...

Example: [email protected] etc]# pwd

/etc

2. Echo: echo text

Command format:

echo [Short-option] ... [STRING] ...

Echo long-option

Options: - N No line break after output text

[[email protected] ~]# echo ' hello! '

Hello!

[[email protected] ~]# echo-n ' Hello '

Hello[[email protected] ~]#

- e turn on the translation escape character (the following characters are encountered for special processing)

\a : Alert Sound

\b : Delete the previous character

\c : Finally, no newline characters are added.

\f : line break But the cursor is still in its original position

\ n : The newline cursor moves to the beginning of the line

\ r : The cursor moves to the beginning of the line, but does not wrap

\ t : Insert a Tab

                 \\ : Inserting \ character

[Email protected] ~]# echo-e ' Hel\tlo '

Hel lo- à The result of the output is not Hel\tlo

- e The escape character is not processed for the default option

[[email protected] ~]# echo ' Hel\tlo '

Hel\tlo

3. History : View commands that have been used by history

Usage: History [OPTION]

Options: - C Clear histrory

N lists the most recently used last N Bar Command

[[Email protected] ~]# History 5

145 Clear

146 which Mans

147 Whereis Histroy

148 which Histroy

149 History 5

Bash to invoke a command in the command history list:

     !#: call history in the first # Bar Command ( # as a number)

     !!: call the previous command

!string: Execute command command last time in history string command at the beginning

     !$: call the last parameter of the previous command

4. Nano : Simple text editor

format: Nano [OPTIONS] [[[+line,column] FILE] ...

Editor using:

Ctrl+y : Previous Page

Ctrl + V : Next Page

Ctrl+o : Save

ctrl+x : Exit

ctrl+g : Get help


This article is from the "Summer Month" blog, please make sure to keep this source http://lkc0110.blog.51cto.com/3410558/1689569

Linux Common commands Summary (Pwd,echo,history,nano)

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.