The directory structure inside the RHEL7
/bin executable file (executable application). RHEL7 inside /bin directory Soft link to /usr/bin
/boot and system boot-related things (equivalent to Windows 100M boot partition)
/dev user to control the kernel, kernel management hardware, the kernel to access the hardware. User space (user management, kernel mapping), kernel space (direct management of hardware). partitions cannot be partitioned separately
/etc stores a configuration file, a parameter file. Modifies a system property or service property. partitions cannot be partitioned separately
/home Normal User directory. A c -disk "user" directory similar to XP for C- Documents settings or win7 . separate partitioning is recommended (reload can be retained).
/lib libraries, modules. RHEL7 inside /lib directory Soft link to /usr/lib .
/lib64 a 64-bit library file. RHEL7 inside /lib64 The catalog is soft-linked to the /usr/lib64.
/media is used to make the default mount point for CD or USB media. RHEL7 There is no use in it, adjusting the default mount point is /run/media.
/mnt generally used to mount an external device to the mount point
/OPT Source Package installation time, no path is specified by default is /usr/local. Custom installation paths are generally used to install to opt
/proc Storage Kernel Parameters
/root storage Root user home directory
/run RHEL7 new, store kernel values, things . Default mount point for media such as CD /run/media
/sbin Store executable binaries and system administration related commands. RHEL7 inside /sbin directory Soft link to /usr/sbin
/srv specific virtual objects, such as OpenStack, will use this directory
/sys setting of the hardware
/tmp temporary file storage location. (crontab-e Scheduled Task) copy to root directory not seen, can be found in / tmp
/usr is similar to programe Files inside windows. /usr and /usr/local suggest separate logical volumes
/var data warehouse, growing faster. Store logs, database files, and suggest separate logical volumes
The directory inside Linux is the folder
DF command
DF-H display the system partition and directory structure with human reading details
DF-HT contains partition type display system partition and directory details (type)
CD command
The CD path does not specify that the path is the current path
xx directory under current path of CD xx )
Absolute path ( /usr/share/doc)
Relative path ( . Current directory : The previous level is located in the directory)
~ Variable value, which represents the home directory of the current user
~ User represents a user's home directory
CD ~ Switch to the user's home directory immediately
CD ~test/switch to test user home directory
CD ~/test Switch to the Test folder under the current user home directory
CD-Switch to the previous directory
Touch command
The touch file path creates a file in a path that does not specify a path that is the current path.
Touch file file does not exist, it is created, the update time exists
Touch Aa1 AA2 aa3 aa4 Create multiple files simultaneously
Touch aa{1,2,3,4}
Touch aa{1..4}
Touch A{a. C
Stat file To view more detailed file modification information
File file structure type, ASCII textmeans text file
RM Delete File command
RM file Deletion with confirmation prompt
Rm-f file Forced Delete (Force)
RM-RF file /directory recursive forced deletion of files or directories
Alias xx= ' setting aliases
Unalias xx Cancel Alias
Cat files are suitable for viewing small files
Cat-n file Displays the file content result contains line number
TAC file upside down look
More file split screen display, carriage return one line, space one page, but only look back, press Q exit view
Less file split screen display large files, enter a row, a page of space, support pageup and pagedown,home and end
"Colon cursor status, input / keyword Enter, you can find (n search down,n to find), press Q to exit"
Head file to view the first few lines of file content, default to the first 10 lines
Head-n digital file Customization View the first few lines of file content (head-digital file)
The Tai file is similar to head
Tail-n + 34 Files from 34 lines to tails
TAILF (tail-f) file view file log in real time
Ln-s AB xx Create a soft link to AB (The graphical interface shows a shortcut)
WC file Statistics file information "line word character"
Wc-l viewing only the number of file lines
Wc-w viewing only the number of words in a file
Wc-c View only the number of characters in a file
mkdir folder name Create Folder
Mkdir-p rh124/aa/bb Parent Parent, the upper directory is not created in the upper level directory.
RmDir folder Delete empty directory
RM-RF directory Delete directory
CP Copy Command
CP-Option /path1/xx/path2/yy yy is a folder,xx copy in, not folder,xx Copy to path2, and then renamed to yy
CP-Option /path1/xx/path2/path2 no xx on the copy to path2, there is, whether the hint is overwritten.
Cp-p file path copy file, including file attributes
Cp-p file File path
CP-RF Directory directory copy directory
Cp-a Directory directory archive
MV Cut Command
MV-option /path1/xx destination The command is similar to the CP command
ifconfig View network configuration
Cat/proc/sys/net/ipv4/icmp_echo_ignore_all Ping uses the ICMP protocol, displaying 0 means ignoring all pings
echo 1>/proc/sys/net/ipv4/icmp_echo_ignore_all echo redirect with a value of 1 does not allow Ping
lscpu Viewing CPU information
cd/sys/devices/system/cpu there are cpu0 and cpu1, which cannot be closed,
Cat Cpu1/online
echo 0 > Cpu1/online
RH124 Chapter 2 managing Files from the Command line