In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Red Hat Operation (3) File mkdir
This is to create a path.
Can be created one at a time.
You can also add-p directly.
Mkdir-p
Delete directory
Rmdir must be removed from the bottom
Rm-rf
Installation
Yum install-y
Tree
This can show the relationship of the file in a tree diagram.
Cd command (change directory)
This is the command to switch to the folder. It usually is.
Cd / /
Of course, we have to distinguish between cd, and this is the current directory. Cd / this is the root directory.
To type cd directly is to switch directly to the home directory. Equivalent to cd, of course, plus a tilde, refers to the current user's home directory.
~
Cd ~ this is to change to the specified user's home directory.
However, cd ~ / this represents the folder under the current user's home directory.
-
This means to change to the last directory.
However, the last time this concept should be noted, switching twice will return to the original directory, because the original directory is the last time.
The relationship of suffixes in Linux
In Linux, most files have nothing to do with suffixes.
View file type file
File
Stat (View File Properties)
Stat
Create a document
The touch path format is similar to the previous one.
If there is, it will be updated, and if not, the file will be created.
Multiple files can be created at the same time.
Touch {{number of beginnings}.. {number of terminations}} start and end
Delete a file
Rm
Rm-I
Rm-f forced deletion
Rm-rf recursive deletion
Rm-rf / *
Alias
Alias View alias
Alias Settin
Alias
Remove alias
Unalias
Ifconfig
View the network card command.
Ifconfig
Wc
Count the number of lines, characters and other commands.
Wc
-l
How many lines to view
-c
Check how many words there are.
File lines, file words, file characters, file name.
The words here are separated by spaces.
Link (ln) soft connection
This is a shortcut.
Ln-s 2 is the soft connection of 1.
Delete
Just use rm-rf
View the contents of the file cat
This is only suitable for viewing small files.
Cat
More
This is suitable for viewing large files.
More
Press enter to display one line at a time. Press the space to display one screen at a time.
But it can't look back with a command.
Less
Less
Keys: pgup,pgon,home,end these keys.
Query keywords are supported
: /
Press n to find the next one and N to find the previous one.
Head
View the first few lines of the file by default
Head-n
Tail
View the last ten lines by default
Display in the same order as the source file.
The format is the same as head.
Tail-n + 38 means that it starts at line 38 and goes to the last line.
Tail-f real-time view
It can be written as tailf.
Cp
Cp-copy something from path 1 to path 2
If the path file does not exist, it is copied and renamed by default.
Multiple file copy
The last file path is the destination.
Cp
When you copy a file, you do not copy the attributes.
Add the parameter-p, and you can copy it.
Force copy directory
Cp-rf recursively forces the copy of the directory.
Cp-rfp is recursive replication, the kind of depth.
Package replication
Cp-a this is a direct deep copy.
Mv cut and paste
Mv-/ /
If you don't have the directory, create it.
Mv is the name of the file that renames the current directory.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.