Linux Basic File command options

Source: Internet
Author: User

Objective

One of the most important ideas in the Linux system-"Everything is a file"-can be said throughout Linux. The general understanding of this concept of files are word,excel,txt such an editable viewable program, Linux will all the hardware and software into a file what is the benefit?

All documents, the underlying hardware and software data is abstracted into a file display to the user, you can use a unified interface to operate (read, write, execute) to achieve the underlying hardware calls, and Linux commands are more complex operations to simplify.

First, the command source of Linux

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/4D/wKioL1WYnXqTz-iJAABSfJvE6yo806.jpg "title=" Qq20150705105037.png "alt=" Wkiol1wynxqtz-ijaabsfjve6yo806.jpg "/>

For the operating system (kernel), user-submitted instructions can not be directly recognized, as the Chinese and foreigners to communicate, or to grasp the other side of the language, or the need for a translator, and the user and operating system between the translator is the "shell interpreter", the user's instructions to the shell, Submitted to the operating system by the shell and ultimately by the operating system to invoke the hardware resources. Linux commands are the languages that the shell can recognize. This is only the CentOS6.5 command, because each Linux publisher uses the same shell in the system, and the embedded commands are not identical.

Ii. introduction of the order

Linux commands are divided into three types: (1) system comes with (2) application (3) script file

Syntax format for the command:

command [options] [ARGUMENTS] commands + options + parameters, the most basic format as

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/6D/wKiom1Wbwg-DmX-OAABYh0v2Z8c602.jpg "title=" Command 1.png "alt=" Wkiom1wbwg-dmx-oaabyh0v2z8c602.jpg "/>

Options and Parameters

Options: Adjust how commands work, options are long and short, which option you need to know about the use of commands.
Short options: For example,-l,-d,-h
Multiple option keys to be separated using white space;-l-d-H, can be combined:-LDH
Long options: for example:--long,--help
Long options generally cannot be combined with
Note: Some options require parameters, called option parameters
For example, Mkfs-t EXT4

Parameters: The object of the command, usually a variety of files or directories in Linux.

Iii. commands acting on commands

Command type judgment

Type: Displays the types of commands, whether the commands are internal or external commands

Internal command: Commands that are brought in by the shell program, such as:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/6D/wKiom1WbxYnRcawlAAAoZaD38iY472.jpg "title=" 111. PNG "alt=" wkiom1wbxynrcawlaaaozad38iy472.jpg "/>

External command: itself is a single executable program file, the command name is the program file name, such as:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/6A/wKioL1Wbx_DCcUD-AAAliaFILD8481.jpg "title=" 112. PNG "alt=" wkiol1wbx_dccud-aaaliafild8481.jpg "/>


source of use of the command

Export: Displays or sets environment variables, which are provided when the shell executes the program.

You can also output environment variables directly with Echo $PATH

Where path is the lookup path for the external command, the path is separated by a colon, and when the external command is used, the shell searches from left to right and executes the command when it is searched.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/6E/wKiom1WbzLPAtqqHAAEWUYhHHr4901.jpg "title=" 1114. PNG "alt=" Wkiom1wbzlpatqqhaaewuyhhhr4901.jpg "/> which: Find and display the path of the command, execute this command from the shell environment variables directly query to the command's storage path, and output to the screen, The absolute path can also be used directly when executing the command, calling the external command directly

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/6E/wKiom1Wb0J6hgnwrAABLpzrRpgA598.jpg "title=" 1132. PNG "alt=" wkiom1wb0j6hgnwraablpzrrpga598.jpg "/>


help query for commands

Internal command: Help Command (command)
External command:
1, command--help, this is the use of an order + long option, this option applies to all external commands
2, man Command,man is the most commonly used help query command, invoking the command's Help manual, and the Help manual is divided into 8 chapters

Note: Man can provide help manuals for applications other than commands, such as configuration files, system calls, and library calls, in separate chapters
Section 1: User commands
2 Chapter: System invocation
3 Chapter: Library invocation
Section 4: Equipment files
Section 5: Configuration Files
6 Chapters: Games
7 Chapters: Miscellaneous
Section 8: Administrative commands

3. Info command: Get online documentation, only the man manual cannot get enough information, or want to know the program's development calendar


These are the most basic instructions, if the English enough, you can look at the Manual of Man. I can only pass the English blind Baidu Google a bit.

This article is from the Linux Learning Log table blog, so be sure to keep this source http://pixiuwho.blog.51cto.com/2966916/1671829

Linux Basic File command options

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.