Ls
List is used to display target lists
Grammar
ls [Options ...] [Arguments ...]
Options
-A all displays all files and directories (including hidden files that begin with.) and the directory itself. and the parent directory. )
-A shows all hidden files excluded with. and. All the files
-L Long displays detailed information in long format (
The output information is from left to right, including file name, files type, permission mode, hard connection number, owner, group, file size
Small, last modified time and filename of the file
-F Appends the type identifier of the file to the output item (no identifier is output when the file is a normal file)
* Indicates an ordinary file with executable permissions
/indicates directory
@ denotes symbolic link
| Represents a command pipeline FIFO
= indicates sockets socket
-C and-lt line selection installation file status time sort output sort by the CTime field in the index node of the file when it is in conjunction with the –l line, the order is based on the state change time of the file
-D Show only the directory itself
-I display file index node number (inode)
-k display file size in kilobytes
-R sorts and outputs a list of directory contents in reverse order of file names
-S displays the file and directory size, in chunks
-T sorts the file and directory change times
-R Recursive processing
--color uses different colors to highlight different types of
Cd
Change Directory switch working directory to dirname dirname notation can be an absolute path or a relative path
Omit dirname switch Current user home directory
~ Indicates the user's home directory
. Represents the current directory
.. Represents the top-level directory of the current directory
Grammar
CD [Options ...] [Arguments]
Options
-P If the destination directory to switch directories is a symbolic link, switch directly to the target directory to which the symbolic link is directed
-L if the target directory of the switch is a symbolic link, switch directly to the directory represented by the word linked, the destination directory to which the non-symbolic link is directed
-When only this option is used, the switch to the previous switch directory is indicated.
type
Displays the type of the specified command (internal command or external command)
Command type:
Alias aliases
Keyword keyword, shell reserved word
function functions, Shell functions
Builtin built-in command, Shell built-in command
file files, disk files, external commands
Unfound not found
Grammar
Type [Options ...] [Arguments]
Options
-T output file, alias, or Builtin indicates that directives are external, command aliases, and internal commands, respectively
-P If the given instruction is an external instruction, its absolute path is displayed
-A displays information for a given instruction in the path specified by the environment variable "path"
File
The hash table is the object that the shell first looks for when interpreting the command, and the shell uses the set path to find the command when the instruction does not exist in the hash table. It will also be placed in a hash table. The next execution is no longer re-searching through path (can provide shell command execution efficiency)
Hash
Grammar
hash [Options ...] [Arguments]
Options
-R clear Hash table record
-P add command to hash table
Date Time management
Hardware clock: Clock
System clock: Date
Hwclock
-w:--SYTOHC
-s:--hctosys
Get help with the use of commands
Internal command:
Help COMMAND
External command:
COMMAND--help
Command manual: Manual
Man [NO.] COMMAND
Sub-chapters:
1: User command (/bin,/usr/bin,/usr/local/bin)
2: System call
3: library Call
4: Special files (device files)
5: File Format (configuration file syntax)
6: Game
7: Miscellaneous
8: System administration Command (/sbin,/usr/sbin,/usr/local/sbin)
Online documentation
Info COMMAND
System Help Documentation
/usr/share/doc
Whatis
Whatis COMMAND
cal Calendar
Echo
Printf
Tree
Directory Management Commands
mkdir Creating an empty directory
-P
-V
rmdir only empty directories can be deleted
-P
File Management Commands
Touch
-C
-A
-M
Stat
Rm
-I.
-F
-R
CP Copy
Mv
Linux Common Commands 1