Linux Learning Notes (5)

Source: Internet
Author: User
Tags aliases system log

First, the system directory structure

  1. Root is the home directory of the root user, under/under, the home directory of the normal user is at//.

  2. directory tree(directory tree),The starting point for this directory tree is the root directory(/, Root);Linuxat the top of the file system is/, we call/to beLinuxof theRoot, namelyLinuxthe file system of the operating system. Linuxthe entrance to the file system is/

    • /usr/bin,/usr/sbin/,/bin/,/sbin/ These four directories are all commonly used commands, such as: Vim,ls ...

      The

      /sbin/is under the root user,/bin/can be used to use the

    • /boot/directory     system-initiated related files

    • /dev/directory     device files (mouse, keyboard ...

    • /etc/directory     System configuration file

    • /home/directory     user home directory

    • /lib/,/ lib64/Directory   System library file (want to see which library the command depends on, with the LDD command, CentOS Start, there is no 64-bit and 32-bit, all 64-bit, the difference is that the memory size is different)

    • /mnt/Directory     Temporary mount point

    • /run/directory     process-generated temporary files, shutdown will disappear

    • /opt/directory     Optional application package location, generally installed on their own can be considered in the

    • /proc/directory   system startup process will produce a PID. All information about the running process is here

    • /srv/ Directory     Service generated files

    • /tmp directory     system temporary files, permissions are large, ordinary users can also delete (with a special permission, the user's own files can only be managed by themselves, No one else has permission to modify.

    • /sys/directory     system kernel files

    • /var/log directory   stored log messages is the system log

3.Yum install-y Tree Install tree (tree-l Show directory depth)

4.TheFHS is based on the frequent use of the file system and whether the user is allowed to change randomly, and the directory is defined as four forms of interaction.

650) this.width=650; "Src=" Https://s5.51cto.com/oss/201710/20/d85baa2520c5975520ac149930ac4cdf.png-wh_500x0-wm_3 -wmp_4-s_3265474336.png "title=" Picture _20171020220758.png "alt=" D85baa2520c5975520ac149930ac4cdf.png-wh_ "/>

 5.        

  • /etc: Configuration file

  • /bin: Important Execution file

  • /dev: Required device files

  • /lib: Function libraries required for execution of files and modules required by the core

  • /sbin: Important System Execution files

Second, ls command

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201710/20/59f7c636db53675b62abb37e3dc96ac3.png-wh_500x0-wm_3 -wmp_4-s_1439953516.png "title=" Picture _20171020224548.png "alt=" 59f7c636db53675b62abb37e3dc96ac3.png-wh_ "/>

The meanings of the colors are as follows:

1. Blue---Directory

2. Green---executable file

3. Red--Compress files

4. Light blue--linked files

5. Gray--Other files

2.ls + Parameters

-a lists all files in the directory, including hidden files that begin with the.

-a shows. and. All files except the.

-D Displays the directory's own properties without displaying the files under the directory.

-l list details of directories or files

-H is used with the-l parameter to display file sizes in a human-readable manner, such as 1k,2m,3g

-I displays inode information for a file or directory, that is, index information

-T sort by modified time display file or directory (time from near sort)

-R used with other parameters to reverse the sort

Iii. Types of files

650) this.width=650; "Src=" Https://s3.51cto.com/oss/201710/20/9fa4577a0e90418fddd2d7452ff030c2.png-wh_500x0-wm_3 -wmp_4-s_2023233887.png "title=" 1508510005.png "alt=" 9fa4577a0e90418fddd2d7452ff030c2.png-wh_ "/>

    • First column:

    • 1. The first letter of D means that the content is a directory

    • The first letter is-when it means that the content is a file

    • The first letter L means that the content is a link file The first letter of C means that the content is a string device (mouse)

    • When the first letter is B, it means that the content is a block device (disk or disc)

    • The first letter, s, means that the content is a communication device.

      2. The following 9 characters represent the permissions of the file or directory, and the letter R W x represents the Read, write, and Execute permissions respectively, and the corresponding permission numbers are 4 2 1 respectively. The first 3 represent files or directories that have this permission, the middle

3. The permissions for all groups representing the file or directory, and the last 3 to access the file on behalf of the other person.

Second column: The number of links representing a file or directory, that is, the directory or file contains several directories or the number of files.

Column Three: Represents the owner of a file or directory.

Column Fourth: All groups representing the file or directory.

Fifth Column: Represents the size of a file or directory, in bytes (byte)

Sixth column: Represents the last modification time of a file or directory (using [Stat file name or directory name] to view the access time of a file or directory access, the modified time of a file or directory modify, the change in the state of a file or directory)

Column seventh: Representing the file name or directory name


Iv. alias Command

Alias system command Aliases

Use which to view the path of a file

Alias new command = ' original command-options/Parameters '

Alias-p viewing system settings aliases

650) this.width=650; "Src=" Https://s4.51cto.com/oss/201710/20/7686204699b231f6a896801e750f1696.png-wh_500x0-wm_3 -wmp_4-s_721864915.png "title=" 1508510653 (1). png "alt=" 7686204699b231f6a896801e750f1696.png-wh_ "/>

This article is from the "13397306" blog, please be sure to keep this source http://13407306.blog.51cto.com/13397306/1974753

Linux Learning Notes (5)

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.