In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Remember the skills of complex Linux commands, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
Linux has experienced so many years, in which there are more and more commands, coupled with a variety of parameters, even real experts are not sure that they can use all kinds of commands perfectly, let alone those beginners.
Faced with these complex commands, some online tools such as Keep,Bashpast CLI,Pet can help us record these complex commands. However, these are a bit difficult to learn, and you need to download specific tools, which is more troublesome.
Here are two tips, you can easily tag some complex commands, you can quickly find the corresponding commands according to the tags, simple and efficient!
Mark the Linux command
We can tag some complex commands that remind you of the purpose of the Linux command. After applying tags to Linux commands, we don't have to enter long and complex commands, we just need to enter the tag characters we set up to OK!
Let's demonstrate a command, such as finding and listing files greater than 10MB in the current directory, and sorting them by size:
$find. -size + 10m-type f-print0 | xargs-0 ls-Ssh | sort-z
I wonder if you remember what this order is for? If you don't remember, part of it will be taken apart and analyzed by yourself.
Because it is too long to see the effect at a glance, we can add a memorable mark at the end of it, preferably reflecting the function of the command, such as setting ListFilesBiggerThanXSize here:
$find. -size + 10m-type f-print0 | xargs-0 ls-Ssh | sort-z # ListFilesBiggerThanXSize
* * Note: * * starts with # and there is a space between the command and the label name.
Try the effect quickly and enter the tag you just saw:
$! # ListFilesBiggerThanXSize
* * here,! * * and? Operator is used to get and run the commands we previously marked from the BASH history.
[alvin@VM_0_16_centos] $find. -size + 10m-type f-print0 | xargs-0 ls-Ssh | sort-z # ListFilesBiggerThanXSizetotal 104K 16K httpd.c 16K shakespeare 12K hello4.0K dir2 [alvin @ VM_0_16_centos ~] $!? # ListFilesBiggerThanXSizefind. -size + 10m-type f-print0 | xargs-0 ls-Ssh | sort-z # ListFilesBiggerThanXSizetotal 104K 16K httpd.c 16K shakespeare 12K hello4.0K dir2
Another way
Another method of memory is "nickname", that is, the use of alias command, we should be familiar with, the principle is similar to marking.
For example, give us a nickname for the above command:
$alias ListFilesBiggerThanXSize='find.-size + 10m-type f-print0 | xargs-0 ls-Ssh | sort-z'
Enter directly when using:
After reading the above, have you mastered how to remember the skills of complex Linux commands? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.