In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Today, what the editor shares with you is a detailed introduction of the shell command in linux. I believe most people don't know much about it. In order to make you understand better, the editor summed up the following content for you. Without saying much, let's move on.
In this article, we will introduce some of the basic commands used in Linux shell.
View and jump command
(1) pwd
When opening the terminal, if you need to know which directory you are currently in, you can use the pwd command, which returns an absolute path (the path starting from the root "/").
(2) ls
Use the "ls" command to know what files and folders are in your directory. You can use the command "ls-a" to view all hidden files.
(3) cd
Use the "cd" command to jump to the appropriate directory. When using it, make sure that the following target directory exists.
Free video tutorial recommended: Linux video tutorial
File and folder command
(1) mkdir and rmdir
Mkdir is used to create directories and rmdir is used to delete directories. Note that rmdir can only be used to delete an empty directory. To delete the directory that contains files, use rm.
(2) rm
Use the RM command to delete files and directories. But RM cannot simply delete directories. Use "rm-r" to delete the directory (with a parameter r), and at this point, the folder and the files in the folder are deleted.
(3) touch
The touch command is used to create files. It can produce any file, either an empty txt file or an empty zip file.
For example:
Copy and move files
(1) cp
Use the cp command copy file. It requires two parameters: the first is: where does the copy file come from, and the second parameter is where to copy the file?
(2) mv
Use the mv command move file. We can also rename the file using the mv command, which is similar to cp.
For example:
The above is the knowledge summary of the shell command in linux, the content is more comprehensive, the editor believes that there may be some knowledge points that we may see or use in our daily work. I hope you can learn more from this article.
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.