LS/down a few common files:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7A/8B/wKioL1arcCCAhzO3AAAeMb_ahlk827.gif "title=" 1.gif " alt= "Wkiol1arcccahzo3aaaemb_ahlk827.gif"/>
/ Boot: System boot related files, such as kernel, INITRD, and Grub (bootloader)
/dev: Device files
View by Ls/dev
Ls/dev-l viewing a symbolic linked file
Block devices: Random access, data blocks
Character Devices: Linear access, by character
Device number: Master device (major) and secondary device number (minor)
/etc: Configuration file
Home directory for users, the home directory of each user is usually the default of Home/username
/root: Administrator's home directory
/lib: library files and kernel module files
Static Library. A
Dynamic library. dll,. So (Shared object)
/lib/modules: Kernel module files
/media: mount point directory, Mount Mobile device
/MNT: mount point directory, additional temporary file system
/OPT: Optional directory, installation directory for third-party programs
/proc: Pseudo file system, kernel mapping file
/sys: Pseudo file system, property mapping file related to hardware device
/tmp: Temp file
/var: a variable file
/bin: Executable file, user command
/sbin: Manage Commands
/ usr: shared,read-only read-only files
/usr/bin
/usr/sbin
/usr/lib
/usr/local:
/usr/local/bin
/usr/local/sbin
/usr/local/lib
Naming rules:
1, the length can not exceed 255 characters;
2, cannot use "/" when the file name.
3. Strictly case-sensitive
Relative path: The path starting from the current path
Absolute path: The path starting from the drive letter
1. File Management
2. Directory Management
Ls
Cd
Pwd
mkdir: Creating an empty directory, creating the last directory by default
eg1:/root/x/y/z Distribution Creation
①mkdir x
mkdir x/Y
mkdir x/y/z
②mkdir-pv/root/x/y/z One-step creation
-P: one-step creation
-V: View the detailed creation process
Tree view Directory Trees
Eg2:/mnt/test/x/m,y
Mkdir-pv/mnt/test/{x/m,y}
Eg3:/mnt/test2/a_b,a_c,d_b,d_c
MKDIR-PV/MNT/TEST2/{A,B}_{B,C}
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7A/8C/wKiom1arhLDwLfOAAAAppXhk5zw903.gif "title=" Mkdir.gif "alt=" Wkiom1arhldwlfoaaaappxhk5zw903.gif "/>
RmDir: Delete directory Delete empty directory
Rmdir/mnt/test, because there's a catalogue under/mnt/test.
Can delete a vein only son directory, delete z,y empty, delete y,x empty, so can be deleted directly X
File creation and deletion
Touch
-A: Modify the "Access" timestamp
-M: Modify the "modify" timestamp
-T [[cc]yy]mmddhhmm[. SS]: modified to the specified timestamp
Star: View file properties
To create a file, you can use the file editor ASCII
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7A/8C/wKiom1arhMWgzPKgAABxRojyZwg173.gif "title=" Qq20160129232442.gif "alt=" Wkiom1arhmwgzpkgaabxrojyzwg173.gif "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7A/8B/wKioL1arhQ6xSXooAAAwu2hAhTU118.gif "title=" Qq20160129233035.gif "alt=" Wkiol1arhq6xsxooaaawu2hahtu118.gif "/>
Delete File: RM
Type RM View RM's Attribute "Rm-i": the alias "-I" represents an interactive command that asks whether to determine the execution
Indicates the use of the command itself, but not the alias when you can add "/"
No aliases, add meaning
-F do not ask, delete directly
-R Recursive Delete directory
Cp:copy Copying files
Use format: [CP source File ... Target file]
A file A to a file B (presence): first prompt whether to overwrite, is to delete the original B, and rename to B
(not present): Place the source file at this file and rename it to B
A file A to a directory C (presence): Place the source file under this directory C and keep the original A
(not present): Place the source file in this directory and rename it to C
Multiple files A to a directory D (presence): Place the source file under this directory D and keep the original A
* * If the source file is a link, copy the past is the link to the file,
-r: Copy directory, recursively copy all files under directory
Copy a directory A to a file B (nonexistent/present): not covered
Copy a directory A to a directory C (present): a copy to C, keep original A
(not present): a copied to C, renamed to C
-F: Forced replication
-I: Hint whether to overwrite, do interactive
-P: Keep the genus Group of source files, owner, permission, timestamp
-L: Copy the linked file, the file that the link points to
-p,-d: Copy linked files, keep links
-r,-r, recursive replication
-A (-r/r,-d/p): Archive replication, often used for backup
EG:CP/ECT/{PASSWAD,INITTAB,RC.D/RC.SYSINST}/tmp
Copy 3 files
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7A/8B/wKioL1arjC-Aj2P2AABtH2HLTU8894.gif "title=" Qq20160130000133.gif "alt=" Wkiol1arjc-aj2p2aabth2hltu8894.gif "/>
Mv:move Moving files
Use format 1:[mv source files ... Target file]
Use format 2:[mv-t destination file source file ...]
A directory A to a file E (presence):/
(not present): Place the source file in this directory and rename it to E
A directory A to a directory F (presence): Cut the source file into this directory F and keep the original A
(not present): Place the source file in this directory and rename it to F
Install
install-d DESCRIPTION: Creating a Directory
Install- t target file source file ... : Copying Files
Install Source file ... Directory/File (* Directory-Directory not line)
-M: Set permissions on the created directory, otherwise the default is: Rwx-xr-x
3. Running the program
4. Device Management
5. Software Management
6. Process Management
7. Network Management
Text Processing: Cat,more,less,head,tail,cut,sort,uniq,grep
Regular expressions
Pipe and redirect:> < "
Users, Groups, permissions
Bash and its features
This article is from the "11160930" blog, please be sure to keep this source http://11170930.blog.51cto.com/11160930/1739992
2016-1-29 Linux Basic Learning 3