Liunx basic 1, directory? /: root directory, generic root directory only, there is only one root directory under Linux. Everything starts here, for example:/home is first from the root directory/start, and then into the House directory. /bin,/usr/bin: Executable binary files directory, such as common command ls, tar, MV, cat and so on. /boot: Place files used by Linux system startup, such as kernel files of Linux:/boot/vmlinuz, System Boot Manager:/boot/grub.? /dev: Store the device files under the Linux system and access a file in that directory, which is equivalent to accessing a device, which is commonly used to mount the optical drive mount/dev/cdrom/mnt? /etc: the directory where the system configuration file is stored, it is not recommended to store the executable file in the secondary directory. /home: The system Default User house directory, when adding user accounts, the user's home directory is stored under Home, ~ represents the current user's home directory, ~hadoop represents the user Hadoop home directory. /lib,/usr/lib,/usr/local/lib: The system uses the library's directory, the program in execution, need to call some additional parameters when the function library to assist. /lost+fount: When an error occurs with the system exception, some missing fragments are placed in this directory. /OPT: The directory where additional software is installed to the host. /root: Home directory for system administrator root.? /sbin,/usr/sbin,/usr/local/sbin: Place the executable commands that the system administrator uses, such as Fdisk, Shutdown, Mount, and so on, which are different from the bin, which are the commands that are used for the system administrator root. General users can only view cannot be set up and used. /temp: A directory that is temporarily stored by the program that the general user is executing. Anyone can access, important data cannot be placed under this directory. 2. Access rights users can control the degree of access to a given file or directory, and a file or directory may have read, write, and Execute permissions:? Read permission (r) has permission to read the contents of the file, and for the directory, to have the Browse directory permission. Write permission (w) for the file, with the new, modify the contents of the file permissions, for the directory, with the delete, move files within the directory permissions. The executable permission (x) has permission to execute the file, and for the directory, the user has permission to enter the directory Note: Typically, the Unix/linux system allows only the owner or superuser of the file to change the file's read and write permissions. EveryA user has its own read, write, and execute permissions. The first set of permissions Controls access to their own file permissions, that is, owner permissions. The second set of permissions controls the permissions of the user group to access one of the users ' files. The third set of permissions controls the permissions of all other users to access a user's files. 3. Establishing a connection Lnlinux link file is similar to a shortcut under Windows. Category: Soft links and hard-link soft links: does not occupy disk space. Source file Delete link follows invalid Hard link: Hard link can only link normal file, cannot link directory format: ln source file Link file ln–s source file Link File Description: If not-s then create a hard link file, two files occupy the same size of hard disk space, delete the source file, link The file still exists. So-S is the more common form. Vim Editor Command mode: yy: Copy the cursor on one line 4yy: Copy four lines down p: Paste DD: Cut the cursor on one line 2DD: Cut down two lines D: Cut backward from the current cursor, until the end of the line D0: from the current cursor to cut, Until the beginning of the line DW: Delete a word x: delete the current cursor. One x: Deletes the current cursor. One up and down: H left J down K on L right H: top of current screen m: middle of current screen N: bottom of current screen ctrl+f: Turn down one page of code CTRL + B: Page UP code 20G: quickly navigate to 20 lines of code G: Quickly navigate to the end of the code GG: quickly go back to the first line of code W: Jump Backward A word's length B: Jump forward a word's length u: Undo ctrl+r: Reverse undo Select a piece of code v:v:>> Move the code to the right.: Repeat the last command for a period of code jump {: up}: Down R: Replace a character R: replace the word after the cursor lines: w: Save Q: Exit Wq: Save exit Shift+zz: Save exit
Basic Linux Basics and Vim usage