In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how PowerShell uses the interactive operating environment efficiently. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Multi-purpose Tab key
In the runtime environment, the Tab key completes the content. In addition to completing subdirectories and subfiles like Cmd, you can also complete PowerShell's Cmdlet, functions, parameters, and so on. This is really useful, for example, to run a script file, you must add ".\" to the script name, otherwise you can't execute it even if you type the full script file name; and you type the first few letters of the script file name, press the Tab key, and the script will be completed to be executable. Isn't it handsome? But there are two points to note:
1. The first few letters you type (of files, commands, etc.) should be distinctive, otherwise you may traverse all matching files, folders and commands
2. I'd rather fight less than make a wrong number, or I won't find anything.
Commonly used Alias
Using Alias is another effective way to improve productivity. There are two main reasons:
1. Alias is generally a familiar command method, whether it is looking for the right command or typing it out, it will be easier.
2, Cmdlet because of structural problems, generally longer, and dash (horizontal bar) is not in the letter area, tapping this key will also reduce work efficiency, and Alias is generally two or three letters, both short and easy to knock, just to make up for the shortcomings of Cmdlet.
In addition, there is a principle that must be mentioned here: when working interactively, use Alias; as much as possible when writing scripts, and use as little or no Alias as possible. This is because, when running commands interactively to complete the work, the commands entered and the desired results are only relevant to the user, and generally do not need to be shared with others, of course, with regard to efficiency; while scripts are generally used for a long time, and many people are maintained, readability is more important than efficiency.
Transfer the battlefield from Cmd to PowerShell
People who want to get in touch with PowerShell are generally people who use the Cmd command line more often. Tools have been used for a long time, but they are naturally kind and unwilling to put them down. But to keep up with the times and fully benefit from the current results, it is necessary to get out of the comfort zone and try new things. To come here, for example, is to transfer your main work environment from the Cmd command line to PowerShell.
Generally speaking, using PowerShell is no more complex than the Cmd command line. For example, you want to take a look at the IP on the machine you are currently using. In the past, you may have pressed the Windows + R key, and then typed cmd, enter, ipconfig, and enter. The whole time is only a few seconds. Now? Just replace cmd with powershel, which is also very fast. But sometimes it's a little more troublesome. For example, if you used to type dir / ad on the command line to see all the subfolders, now type dir |? {$_ .mode-like "d*"}. Type a little too much, but this is the way to get familiar with the tool after all. Worst of all, if you're in a hurry to execute a command, but the powershell command can't be remembered by 01:30, type the "cmd / c command" into PowerShell, such as the command to find hidden files in the current directory: cmd / c dir / ah. In short, to play more PowerShell, play more to be familiar, familiar to make skillful.
This is the end of the article on "how to efficiently use the interactive running environment for PowerShell". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.