In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you how to remember the relevant knowledge points of Linux command skillfully, the content is detailed, the logic is clear, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you can get something after reading this article, let's take a look at it.
History
The first thing to introduce is the command line tool history, which can help you remember the commands you have used. Most Linux shell, including the most widely used Bash, create a history file that contains the commands you have typed. If you are using Bash, the history file is / home//.bash_history.
This history file is in plain text format, and you can open it with any text editor to browse and search.
Apropos
There is a command that can help you find other commands. This command is apropos, which can help you find the right command to complete your search. For example, if you need to know which command can list the contents of a directory, you can run the following command:
Apropos "list directory"
This is the search result, very direct. Add the plural to "directory" and try again.
Apropos "list directories"
It won't work this time. What apropos does is actually search for descriptions of a series of commands. Commands that describe mismatches are not included in the results.
There are other uses. With the-a flag, you can add search keywords in a more flexible way. Try this command:
Apropos "match pattern"
You would think that there should be some matching content, such as grep, right? However, there is actually no match. Again, apropos searches only literally.
Now let's try to separate the words with the-a sign. (LCTT translation note: this option means "and", that is, multiple keywords exist, but strings that happen to be concatenated are not required. )
Apropos "match"-a "pattern"
At this point, you can see a lot of expected results.
Apropos is a great tool, but you need to be aware of its flaws.
ZSH
ZSH is not really a tool for memorizing commands. It's actually a shell. You can use ZSH instead of Bash as your command line shell. ZSH includes an automatic error correction mechanism that can give you a prompt when you enter a command. When this function is turned on, it will prompt you for similar choices. In ZSH you can use the command line as usual, while you can enjoy an extremely secure network and other very useful features. The easiest way to take full advantage of ZSH is to use Oh-My-ZSH.
Shorthand chart
Finally, and perhaps the most indirect way is to use shorthand.
There are many online shorthand notes, such as this one, which can help you query commands quickly.
For a quick query, you can look for a shorthand sheet in image format and set it as your desktop wallpaper.
These are all the contents of the article "how to remember Linux commands". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.