Windows command Prompt Tips

Source: Internet
Author: User
Tags current time

Click "start → program → attachment → command prompt" or "Start → run", and then enter "CMD" to enter the command prompt state.

or direct win key +r directly out of the "Run Window", and then enter the "CMD" command.

  1. Use automatic memory function skillfully

Command window has command memory function, all of the command lines you enter in the window will be automatically remembered, by clicking on the keyboard on the upper and Lower arrow keys can be just entered the command one by one, similar to the doskey instruction in DOS, but it put this instruction within the command window. This memory function eliminates the pain of repeatedly entering the same instruction, and is especially useful for debugging network environments, which can save you a lot of repetitive work and valuable time.

2, Fun prompt

Would you imagine getting your command prompt to be the current time? Can you display the current version of Windows XP? You can do it if you want. Here we will teach you how to achieve.

Here we use a prompt dos command, the command has a lot of practical parameters, the detailed parameters of the role of the reader in the prompt state run prompt/? After you understand the role of these parameters, you can create a file under the installation path, name it Run.bat, and the contents of the folder are prompt $V $d$g$g. Next, open Registry Editor, browse to Hkey_local_machinesoftwaremicrosoftcommand Processor, and then double-click the Autorun key value on the right to change it to%systemroot% Run.bat, save settings exit. Open the command prompt again, and how does it change? In fact, as long as you are based on the parameters of prompt can define a very rich hint text.

  3, copy the window content

The copy of the string is quite useful for the command window. However, the Windows 2000 and Windows XP command prompt are copied in much the same way as in previous versions, even though they are not the same, using the tag-copy method, which is a copy of the right mouse click. The detailed description is as follows:

In Windows XP, for all of the content, you can directly click the right mouse button in "Select All" to select, and for the specified range of content, you can click the right mouse button to select the "Mark" item, and then move the mouse to the command character to be copied, drag the mouse to select the string, These strings will immediately appear in the reverse white form on the screen, click the right mouse button or press ENTER, and then move to the target location, right-click and select "Paste", so that a command string is automatically copied to the specified location.

Under Windows 2000, because the menu of the right mouse button is not supported in the Command window (but it supports the drag selection of the mouse), so it gives a more concise way to copy the command characters in the day, first you have to hold down the left mouse button and drag the command string you want to copy, and they will appear in reverse white on the screen, First click on the right mouse button (that is, the copy operation), the mouse to move to the target location, and then click the left mouse button again, the command character will automatically paste into a new position!

  4, change the window characteristics

If you work at a command prompt for a long time and you can adjust its appearance to suit your own habits, such as customizing the title of its window, color, and so on, you often use the following related commands:

A) Change of title: cmd/k Title New header name

b Change the command character: cmd/k PROMPT [text] (text is a new command prompt)

c) Change foreground and background colors: CMD/T:GF (g is a hexadecimal number that specifies the background color. Commonly used colors have the following values: 0 black, 1 blue, 2 green, 3 light green, 4 red, 5 purple, 6 yellow, 7 white, 8 gray, 9 blue, a green, B light blue, C light red, D pale purple, E light yellow , f bright white.

  5, the Command Window shortcut keys

There are many handy shortcuts under the command window that can greatly speed up your input and debugging, and some features are provided graphically.

ESC: Clears the current command line;

F7: Displays the command history, gives all commands you have entered in the form of a graphical list window, and optionally executes the command using the up and DOWN ARROW keys.

F8: Search The history of the command, loop to show all the commands you have entered until you press ENTER.

F9: Select the command by number, which requires you to enter the number (starting from 0) of the command and display the command on the screen in a graphical dialog box;

Ctrl+h: Deletes one character to the left of the cursor;

CTRL + C Ctrl+break, forcibly suspend the execution of the order;

Ctrl+m: Indicates a carriage return confirmation key;

ALT+F7: Clears all previously entered command history records;

Alt+printscreen: Intercepts the contents of the current command window on the screen.

 6, good "color" command line

The command line is always black and white in the default state, and it starts with the axe. In the Run dialog box, enter CMD, open a command prompt, right-click on the title of the open window, select Properties from the pop-up menu, and switch the open window to the Color tab, select the screen text, screen background options, and set the corresponding color. Note that when we change the settings, they are displayed in real time, according to this, we can make adjustments according to our liking, and then save the settings ask the application properties, select "Save the property for later with the same title window", so that you do not only the current window into effect.

7. Quickly select files and folders

At the command prompt, we can press the TAB key to select the files and folders under the current directory, the selection is in a certain order, press the Shift+tab key combination can also be reversed direction selection, very convenient. Note that the file we selected at this time also includes hidden files.

 8, Save the file list information

Sometimes we need to print out all the file list information in a directory on the hard disk, at this point we can use the following method: Type the command dir>c:1.txt and then enter, so the file list of the current directory will be saved to the 1.txt file in C disk.

Just like fish can not be separated from water, Windows systems are still inseparable from the operation of DOS commands, master those command prompt and clever use. There will be a different feeling in the XP system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.