Classification of Linux commands
type [Command]
Example:
type echo
type mkdir to
check whether it is an external or internal command
Linux command line format
Command word [option] [parameter] [file directory]
The command word is the most critical part of the entire command. The
short format option uses "-" to guide the
long format option uses "–" to guide
Auxiliary operation
Tab key: automatic completion
Ctrl+L: clear screen
Ctrl+C: cancel this command edit
Common commands
Get help: [] --help man []
View the current working directory: pwd
Switch directory: cd cd ~ switch to the current home directory cd… switch to the upper directory
Display list content: ls Display detailed information under the directory: ll
set alias :Alias Example: alias myls='ls-ah' set the alias to ls-ah
Statistics directory/file space usage: du
create a new directory : mkdir
mkdir -p aa/bb/cc create a multi-level directory at one time mkdir -p aa bb cc create multiple directories at once
Create an empty file : touch
touch aa bb
Delete data: rm -rf [file] rm -rfd [directory]
Copy data: cp 123 123bak20200709
Create a link file: ln -s [File/Directory] [File/Directory]
Adding s means to create a soft link. The soft link can create files and directories, but the content of the soft link file is also deleted after deletion.
Hard links can only create files, not Create a directory
Move files or directories
Find command which: used to find commands
Find command find: used to find files or commands
Keywords: -name (search by name) -size (search by file size) -user (search by file owner) -type (
search by file type) search for files, in /boot, the file size is 1024k, And the name starts with "vm"
View space usage
View i-node usage