Linux Command Summary

Source: Internet
Author: User
Permission management

Use the ''chmod'' command to change the object ACL. Use ''chown ''to change the object ownership.

For example: chmod 755 xxx chmod a + x xxx chown user: group xxx is used to change the owner user of the file. You can also change its owner group chgrp group xxx to change the owner group of the file.

There are a total of 10 positions, which can be divided into four groups: d rwx r-x the first group has only one character: -** d ** folder-** common file-** l ** link-** B ** block device file-** c ** character Device File. The remaining three groups are the owner user, owner group, and other users or groups.
By default, your last command prompt is ** $ **, which means that you will execute the command as a common user. Now, when you run the ''su ''command, the system will prompt you to enter the password. Enter the administrator password. At this time, you will find that the last position of the command prompt is changed to ** # **, And you will execute the command as the root user.

File Management

Cd-Return to the last directory
Pwd (print working directory) displays the current path

Task Management --------

** & ** Add a ''&'' sign at the end of the command to indicate the background task, for example: wget http://www.download.net/xxx/mp3 &

**; ** Use '';'' to link Multiple commands.

** & ** Use ''&'' to link Multiple commands. This means that only the preceding commands are successfully executed and Subsequent commands can be executed.

** ''' <Command> '''. If a command contains ''''' (press the key below the ESC key) if the sub-commands are included, the sub-commands are preferentially executed, and the execution results are substituted into the upper-level commands for further execution. For example, you can create a file named after the current time ::: touch 'date + % m. the % d _ % H: % m: % s '''touch'' command can be used to create a file, its operation object, output ''06 for the ''date + % m % d % H % m % s' command. 06_06: 06: 60 ''. In this way, we create a file named ''06. 06_06: 06: 60 ''file (60 seconds after 06:06, January 1, June 6 -_-!)

** Ctrl + z ** suspends a task in the current shell. The task status is: [1] + stopped XXX.

** Bg ** runs the background of the suspended task. The status is: [1] + xxx &

** Fg **: transfers the background task to the foreground for execution.

The number in ** jobs ** square brackets is the task number of the command. You can run the ''job'' command to view all background tasks. If multiple tasks are run in the background, you can follow the task id in ''bg ''or ''fg'' as the operation object, for example,: bg 2

Pipeline, redirection ------------

**> ** The redirection symbol is used to redirect the command output to a file. For example, if we want to save the result of the command ''ls' as the ''filelist'' file and make a list, we can use the redirection symbol to complete it ::: ls-l> FileList

**> ** Is similar to ''>''. The difference is that ''>'' writes command output to the end of the file in append mode.

** <** Is a redirection from a file to a command. The file content is used as the command input.

** | ** Is the pipeline symbol. It serves as the output of the previous command as the input of the next command. If there are too many files in a directory, the ''l'' command cannot be fully displayed on the screen. In this case, you can output the ''l'' command, use the pipeline symbol as the input of the browser ''less. You can use the browser function to flip the page and find: ls-Al | less

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.