Linux Learning Essay Three

Source: Internet
Author: User

First, the root directory detailed

Second, the file command uses


ls/ Enter the root directory

/ boot system startup related files

such as kernel, INITRD, and Grub (bootloader) boot loader

/ dev device files

Light blue link File, * * * for special files

The device files are:

Block devices: Random access, data blocks

Character Devices: Linear access, by character

Device number: Main device number (major) and secondary device number (minor)

/ etc configuration file

/home User House Directory

Each user's home directory usually defaults to/home/username form

/root Administrator home directory (in production environment is not recommended to log in root, the permissions are too large, easy to make mistakes, need to use permissions and then login)

/lib Library files cannot be used alone and can only be called

/lib/modules kernel module files

The library file has a static library. A

Dynamic Library. dll. So (Shared object)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/90/wKiom1Yg1W-xrQHxAAH1OF6-tB4103.jpg "title=" Qq20151016184531.png "alt=" Wkiom1yg1w-xrqhxaah1of6-tb4103.jpg "/>

File libc-2.5.so

File/bin/ls

With two commands you can see that running LS needs to call libc This file, it is also a shareable file

/media mount point directory, typically a mobile device

/mnt mount point directory, usually additional temporary file system mounts

/opt Optional Directory

/proc pseudo file system, kernel mapping file

/sys Pseudo file system, property mapping files related to hardware devices

/ tmp temp file/var/tmp is also a temporary file

/ var changeable files

/bin executable file, user command

/sbin Management commands

/usr shared,read-only

/usr/bin

/usr/sbin

/usr/lib

/usr/local

/usr/local/bin

/usr/local/sbin

/usr/local/lib

Not all of the above local is necessary.


File naming rules

1, the length can not exceed 255 characters

2. Cannot use/when file name

3. Strictly case-sensitive


Directory Management Commands:

LS CD pwd

Mkdir
English Intent: Make directories
Location:/bin/mkdir
Execute Permissions: All Users
Syntax: mkdir-p "directory Name"
Function Description: Create a new directory
Option-P Recursive creation

-V details (verbose)

Example: MkDir A

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/90/wKiom1Yg4xTzP8thAADKoj1XJTs460.jpg "title=" Qq20151016194404.png "alt=" Wkiom1yg4xtzp8thaadkoj1xjts460.jpg "/>

Mkdir-p/tmp/123/456

Tree view Directory Trees

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/8D/wKioL1Yg5CKTc8gOAADohrpug0s022.jpg "title=" Qq20151016194757.png "alt=" Wkiol1yg5cktc8goaadohrpug0s022.jpg "/>

Mnt/test/x/m,y mnt under Create test and underneath the x,x contains m,test under Create Y, how to execute once

mkdir-pv/mnt/test/x/m mnt/test/y

Mkdir-pv/mnt/test/{x/m,y} curly braces indicate command line expansion, and this can also be expanded

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/8D/wKioL1Yg5b3wulWoAAHJ3Zj7E7M888.jpg "title=" Qq20151016195451.png "alt=" Wkiol1yg5b3wulwoaahj3zj7e7m888.jpg "/>

How to create a Mnt/test2/a_b,a_c,d_b,d_c

(a+d) (b+c) =AB+AC+DB+DC

{A,d}_{b,c}

MKDIR/MNT/TEST2/{A,D}_{B,C}

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/8D/wKioL1Yg52WBLAwrAAJACuSZ2_8266.jpg "title=" Qq20151016200156.png "alt=" Wkiol1yg52wblawraajacusz2_8266.jpg "/>


RmDir Delete directory (remove directory), note that only empty directories can be deleted

Rmdir-p/mnt/test2/a_c

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/8D/wKioL1Yg6NjBocofAAEeYeHCkdU013.jpg "title=" Qq20151016200803.png "alt=" Wkiol1yg6njbocofaaeeyehckdu013.jpg "/>


Creation and deletion of files:

#touch can create a file, but its main function is to modify the timestamp

Location:/bin/touch
Execute Permissions: All Users
Syntax: Touch "file name"
Function Description: Create an empty file

Touch a

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/8D/wKioL1Yg6b-iVRiAAACPHFnMK3k355.jpg "title=" Qq20151016201048.png "alt=" Wkiol1yg6b-ivriaaacphfnmk3k355.jpg "/>

Stat a650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/91/wKiom1Yg6dihiFO5AAH6KIoMtgM873.jpg "title=" Qq20151016201257.png "alt=" Wkiom1yg6dihifo5aah6kiomtgm873.jpg "/>

touch-c C does not create a file

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/91/wKiom1Yg63SRW9T-AACQU-jXTdw762.jpg "title=" Qq20151016201934.png "alt=" Wkiom1yg63srw9t-aacqu-jxtdw762.jpg "/>

Touch-a a change the file access time

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/91/wKiom1Yg68jRRmtBAAJgwmEif34196.jpg "title=" Qq20151016202111.png "alt=" Wkiom1yg68jrrmtbaajgwmeif34196.jpg "/>

touch-m A change the file modification time

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/8D/wKioL1Yg7HCQoxCcAAJJbP4XFlw560.jpg "title=" Qq20151016202328.png "alt=" Wkiol1yg7hcqoxccaajjbp4xflw560.jpg "/>

TOUCH-MT 201212121212 A Specifies the file modification time

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/91/wKiom1Yg7O7ynviAAAJGkrIOn5E408.jpg "title=" Qq20151016202603.png "alt=" Wkiom1yg7o7ynviaaajgkrion5e408.jpg "/>

Access time, modify modify time, change state time

ASCII American Information Interchange Code

Stat is three times to view files


RM Delete file (too much permission, use sparingly)

Options:

-F: Force delete

-r: Recursively delete directory

RM-RF/This named caution operation, is to delete the root directory, destroy the system's move, deadly operation

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/8D/wKioL1Yg7x3AQGDjAAC-Og8LAnk680.jpg "title=" Qq20151016203452.png "alt=" Wkiol1yg7x3aqgdjaac-og8lank680.jpg "/>




Linux Learning Essay Three

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.