Command type:
Built-in command (shell built-in), internal, built-in
External command: There is an executable file corresponding to the command name in a path on the file system
Man COMMAND:
Sub-chapters:
1: User command (/bin,/usr/bin,/usr/local/bin)
2: System call
3: Library User
4: Special files (device files)
5: File Format (configuration file syntax)
6: Game
7: Miscellaneous (Miscellaneous)
8: Management Command (/sbin,/usr/sbin,/usr/local/sbin)
Mans:
Name: command names and features brief description
Synopsis: Usage notes, including available options
DESCRIPTION: A detailed description of the command function, which may include the meaning of each option
Options: Explaining the meaning of each option
Files: The configuration file associated with this command
BUGS:
EXAMPLES: Using the example
See ALSO: Another reference
<>: Required
[]: Optional
... : multiple times can occur
|: Choose one More
{}: Grouping
Flip Screen:
Turn back one screen: SPACE
Turn One screen forward: b
Turn back one line: ENTER
Turn One line forward: K
Find:
/keyword: Backwards
N: Next
N: Previous
? KEYWORD: Forward
N: Next
N: Previous
Q: Exit
Ls:list
-L: Long format
-H: Do unit conversions
-A: Show hidden files starting with.
. Represents the current directory
.. Represents the parent directory
-A
-D: Display the directory's own properties
-i:index node, inode
-R: Reverse Display
-R: Recursive (Recursive) display
[Ls-l shows the long format in detail:
-: Normal file (f)
D: Catalog file
B: Block device files (blocks)
C: Character device file (character)
L: Symbolic Link files (symbolic link file)
P: Command pipe file (pipe)
S: Socket file (socket)
File permissions: 9-bit, every 3-bit group, each group: rwx (Read, write, execute), r--
Number of hard links to files
Owner of the file
Genus Group of files
File size (size), in bytes
Timestamp (timestamp): Last Modified Time
Access: Access
Modified: Modify, the file content has changed
Change: change,metadata, meta data
]
working directory, current directory: Directory
Pwd:printing working directory displays the current catalog
Cd:change Directory Switch Directories
Home directories, home directories, home directory
CD ~username: Enter the home directory of the specified user
CD-: Switch back and forth between the current directory and the previous directory
# Tree: View directory tree
mkdir: Creating an empty Directory
-P: Recursively Create multiple directories
-v:verbose Displays information each time a new directory is created
Example:
Mkdir-pv/mnt/test/x/m/mnt/test/ymkdir-pv/mnt/test/{x/m,y}
RmDir (remove directory) Delete directory
-P Delete Empty directory
File Management
File creation and deletion
# Touch
-A or--time=atime or--time=access or--time=use only change the access time.
-C or--no-create does not establish any documents.
-D uses the specified date time instead of the current time.
-M or--time=mtime or--time=modify only change the change time.
-R Sets the date and time of the specified document or directory to the same date and time as the reference document or directory.
-t use the specified date time instead of the current time.
--no-create will not create a new file.
# RM
-f,--force forcibly removed. Ignores files that do not exist and does not prompt for confirmation.
- i--interactive Interactive mode to delete files, before deleting files to give a hint.
-R recursively delete files and directories under directory
# CP
CP SRC DEST
-A This option is typically used when copying a directory. It retains links, file attributes, and recursively copies the directory, which is equal to the combination of the DPR option.
- D: When a symbolic connection is copied, the destination file or directory is also established as a symbolic connection and points to the original file or directory connected to the source file or directory;
-F: Forcibly copy the file or directory, regardless of whether the destination file or directory already exists;
-I: Ask the user before overwriting the existing file;-L: Make a hard connection to the source file, not copy the file;
-P: Preserves the properties of the source file or directory;
-R/R: Recursive processing, all files under the specified directory are processed together with subdirectories;
-S: Create a symbolic connection to the source file instead of copying the file;
-U: When using this parameter, the file will only be copied when the source file is changed more than the target file is updated or if the target file corresponding to the name does not exist.
- S: When backing up a file, use the specified suffix "S Uffix "Instead of the default suffix of the file;
-B: The target file is backed up before overwriting the existing file target;
"Example: CP file1 file2 File3
A file to a file
Multiple files to a directory
Cp/etc/{passwd,inittab,rc.d/rc.sysinit}/tmp/"
#mv: Move
MV SRC DEST
Mv-t DEST SRC Move the source file to the destination directory
-F: Mandatory
#install Installing or upgrading software or backing up data
(1) Install [options] ... Source Destination
(2) Install [options] ... Source... Catalogue
(3) install-d [options] ... Directory ...
--backup[=control]: A backup of each existing destination file.
-B: Similar to--backup, but does not accept any parameters.
-C: (This option is not processed).
-d,--directory: All parameters are processed as directories, and all home directories for the specified directory are created.
-D: Create < destination > all home directories, and then copy < source > to < destinations >; is useful in the first use format.
-g,--group= Group: Sets the owning group itself, not the group to which the process currently belongs.
-m,--mode= mode: Set your own permission mode (like chmod) instead of rwxr-xr-x.
-o,--owner= owner: Self-setting owner (for Superuser only).
-p,--preserve-timestamps: The time attribute of the corresponding destination file with the access/modification time of the < source > file.
-s,--strip: Remove the symbol table with the strip command only for the first and second use formats.
-s,--suffix= suffix: Specify the < suffix > for the backup file yourself.
-v,--verbose: Process each file/itemRecord
This article is from the "10893542" blog, please be sure to keep this source http://10903542.blog.51cto.com/10893542/1742284
Linux basic commands common options (directories and files)