-: Normal file D: Directory B: Block device file (block) C: Character device file (character) L: Symbolic link File P: Command pipe (pipe) S: Socket file (socket)
File permissions: 9-bit 3-bit group of rwx (read, write, execute)-: Delegate does not have this permission
Number of File links
File owner
Filegroup (Group)
File size (size) units default to bytes
Timestamp (timetamp) Last modified time Note: Three timestamp, access time (access) modify time (Modify) change the attribute or metadata time (changed)
LS option-L: Unit conversion (KB,GB)-A: Show all but not display. .. (. For the current directory: To the top level directory)-A: Show All Files-I: Display file index node (index.node-inode)-R: Reverse-order Display file-r: Recursive display
CD: Toggles the current directory. CD does not add options and parameters when returning home directory, CD ~ also back home directory, CD-switch between the current directory and the previous directory, CD ~ username into the home directory of the specified user (must be the root user)
Command type: Built-in commands (shell built-in) and external commands (an executable file corresponding to a command name in the file system) type can show whether the command is built-in or external
Environment variables: the memory space of the command, specifying the user's current working environment, printenv can view the environment variable configuration file
Path: The paths where the command exists, the paths separated by colons, and the order is critical
Hash: command cache, log all the command path used, when the first time to find the hash of the cache record, and then to find in the path, when the user first use a command when the computer must first find in path, The speed of finding data in the hash list is 0 (1) No matter how long the queue is, the speed of finding a data is the same, much faster than in path, if the command is not executable in the path path
Get help with commands: Internal command: Helper commad external command: LS--help
Command manual: Man Commad, Mans 8 chapters common
1. User commands (everyone can use) 2. System call 3. Library call 4. special files (device files) 5. file format (configuration file Syntax) 6. Game 7.miscellaneous 8. Management Commands (/sbin,/usr/sbin,/usr/local/ Sbin
The command manual describes the "" can be omitted, | For more than one, "the" must write the content, ... Multiple, {} groupings can occur
Man:name name and function Brief description synopsis usage notes, including a detailed description of the available options description command functions, including the meaning of each option explains the meaning of each option files This command related configuration file Bugs report an error vulnerability Examples use example see also additional references (note: space backwards, B forward, enter backward one line, K forward line, find//or?) , n the previous one, n after one, q exit)
Hardware time and software time: clock (or hwclock) View hardware time date view software time hwclock-w change system time to hardware time hwclock-s change hardware time to system time
Online Manual Info Commad:pg up pg do tab selection
ELE: Executable, linked binary file
ECHO-E: \b backspace \ t horizontal indent (tab) \v vertical indent (tab) \ n No Line break
printf: Default no line break \ n Remove newline characters
File: Document properties
File system:
Rootfs: Root file system
/boot: System startup related files, such as kernel.
/dev: Device file, block device (random access), character device (linear access) device number, main device number, secondary device number
/etc: Configuration file, plain text file
/home Directory (root no home directory)
/lib: library file/lib/modules kernel module file
/media: mount point directory, mobile device
/MNT: mount point directory, additional temporary file system
/OPT: Installation directory for third-party programs
/proc: Pseudo file system, shutdown without any content, boot on it, the kernel of the mapping files and kernel data
/sys: Pseudo file system, related properties of hardware devices, mapping files
/tmp: Temporary files, anyone can create files, but can only delete their own established files/var/tmp another temporary file
/var: changeable file--run-pid process ID number
/bin: Executable file, user command
/sbin; management commands
/usr; global shared read-only files/usr/bin,/usr/sbin,/usr/lib and/usr/local/bin,/usr/local/sbin,/usr/local/lib
Naming rules: 1. Length cannot exceed 255 characters 2. Cannot use/when file name 3. Strictly Case-sensitive
mkdir: Create empty directory Rename,-p recursion,-V show creation process, example Mkdir-pv/test/{x/m,y} and/test2{a,d}_{b,c}
RmDir: Delete Empty directory-P recursive delete
Touch: File creation, timestamp change,-C does not exist the specified file does not establish the file-a modified access time-m modify the modified time-m-t specified time
RM: Delete file,-F Force-R recursive-I query
CP: Copy the file, the last parameter can only be the target file, there may be many sources but only one target, if the directory does not exist is automatically renamed, if there are multiple sources, the target must exist in the directory, by default, can not copy the directory,-R or-r recursive copy directory and subdirectory files, directory replication can also rename, Cannot overwrite files of the same name,-I inquiry,-F mandatory,-P reserved owner, genus Group and timestamp (root)-a keep all attributes of file, commonly used for file backup CP default copy link file to file-P keep link, CP/{a,b,c/e,d} bulk copy
MV: Move the file, cannot overwrite the file with the directory, will not overwrite the directory but will be saved in the directory, if the same directory MV ad AC renamed,-T can specify the target and then specify the source
Install: Copy file and specify properties,-d specify location Create directory-T cannot copy directory
This article is from the "stupid Bird first-FAI" blog, please be sure to keep this source http://benniaoxianhui.blog.51cto.com/10463960/1670725