Linux Command 1 and Linux Command 1

Source: Internet
Author: User

Linux Command 1 and Linux Command 1

I am a beginner in Linux, and my experience is certainly not as comprehensive as you are, but I really want to write down what I have learned and some of my insights in the learning process.

First of all, I mainly read the book "laruence's house dish". This is a great book, but you will find that you are very bored when reading a book, because the previous four chapters are all about computer principles. For a student like me who has already been familiar with computer knowledge, it will inevitably be a bit cool, maybe I will go back and study this thing in the future, but now I may not be able to get back to the ground.

OK. Let's enter the Linux World.

The following are my notes during the course of study. I would like to share them with you. If there are any mistakes, I hope you will give me some advice and hope my predecessors will guide me as a newbie who just entered the linux Hall.

Run the following command on the terminal:

1. date command, which is the built-in Time

2. Run the cal to display the calendar command to list the calendars of the current month.

The cal year displays all calendars of the current year.

 

Haha, linux is still very powerful. As long as you have exceeded February December, the system will definitely tell you that month is from 1 to December.

3. the bc calculator is a calculator that comes with linux. You can regard it as a calculator that comes with windows. Just input the formula directly. The problem arises again, so I want to limit this calculator, because it does not retain the decimal point by default, so scale = (you want to keep the digits after the decimal point) will help you solve all the troubles, hey!

 

Remember how to exit the BC calculator and enter quit and press enter to exit the calculator.

OK. For some commands, you don't know how to use them. In fact, for good English, linux is simply a welfare. Why can't I use English.

4. man's powerful man is a very powerful HELP command in linux, which can help you understand the role of the command directly!

 

 

Handsome. All the descriptions about date are available. Remember to press q to quit!

5. nano is a very simple compiler. Wow, you may know that text.txt is text. So what should we use to compile liunx? Yes, it's nano.

There is a prompt below, right? But I don't know what ^ is. The ctrl key is used.

6. shutdown command

7. reboot, halt, poweroff restart, and Shutdown

The above two commands can be used as the name suggests.

Well, today I will summarize some of my notes here. If you think something is wrong, please come up and let us solve it together! Hey!


Linux commands

Step by step,
First, ls-lR/etc/shows all the files (-l) in the/etc/folder in detail and recursively displays the contents (-R) in the subfolders)
Second, the channel | indicates that the standard output (stdout) of the previous command (screen output, standard input on the keyboard) is used as the input of the subsequent command.
Thirdly, tee reads data from the standard input device, outputs its content to the standard output device, and saves it as a file. For example, if ls-lR/etc/| tee stagel. out is used, the ls content is output to the screen and saved as stage1.
Then, | sort | tee stage2.out, sort sorting command, because tee stage1.out outputs the result to the screen, then enters the result to sort through the channel, and then inputs the result to tee, output the result to the screen and save it as the file stage2.ou
Then, sort-r | tee stage3.out, which is similar to the previous one, but it is in descending order.
Then, | uniq-c | tee stage4.out, uniq-c, duplicate rows are displayed only once, and the number of repetitions is marked.
Finally,> stage5.out is critical. As I mentioned earlier, tee will be output to the screen, but when you run this command, you will find that there is no screen output, and the problem is here.> it is a redirection symbol, to redirect the standard output to stage5.out
Hope to help you

What is the command returned by linux at the upper level? How to write?

Note that there are several specific symbols in linux shell.
One is the current directory, for example:
Sh./xx
Is to use shell to run the xx program in the current directory.
One is .. refers to the upper-level directory, for example:
Vi ../xx
Is to use vi to open the xx file under the upper-level directory.
Cd ..
Change the upper-level directory to the current directory, that is, the upper-level directory is returned.

In addition ~ Represents the Home Directory of the current user.
Cd ~
Return to the Home Directory of the logged-on user.

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.