Internet 2

Secrets and tricks for the Command Prompt

The Windows tool called Command Prompt (or Command Line in Greek) may seem boring or even useless at first glance, but if someone has used it even a little, then they have definitely loved it!

Internet 2

We guarantee that these secrets and tricks Command Prompt they will excite you.

Whatever you do, don't miss out on the crazy Command Prompt tricks we're bringing you today where you can either blow your friends away with your knowledge or even watch the entire Star Wars Episode IV movie for free straight through the line of commands.

Enjoy!

1. Use Ctrl-C to stop a command

keyboard Command Prompt

Each command can stop its operation with the cancel statement: Ctrl-C.

If you have not typed a command, you can simply delete what you have written with the backspace key, but if you have already executed the command then you can press the "Ctrl" and "C" keys at the same time to stop it.

Ctrl-C is not a magic wand and can not fix things that are not reversible, such as a partially integrated format command.

However, in some cases, such as the dir command which can have huge results or if the CMD asks you something you do not know the answer to, the quit command is a great choice - a trick you need to know.

2. View the results of one command at a time (or line) at a time

Command Prompt

Have you run a command, like the dir command, that produces so much information that flashes on your screen in a flashing fashion to make it almost useless? You are not the only one.

One way to solve the problem is to run the command in a special way, so that the information that appears appears to have one page or one line at a time.

To do this, simply type the command, the dir command for example, and then enter the redirect function performed with the symbol | and then the "more" command.

For example, executing the command dir / s | sea will generate thousands of lines with the results you would expect from the dir / s command, but the more command will stop rolling the results on each page by putting a -More- at the bottom of the page, indicating that to see the next page of the results you just have to press the spacebar or press the Enter key to move one line at a time.

3. Automatically execute the command line as an administrator

Command Prompt Command Prompt

Many commands require you to run them from a command prompt in Windows - in other words, to run them from a command line run by an administrator.

You can always right-click on any Command Prompt shortcut and select "Run as administrator", but creating a shortcut for the same thing can save you time if you are a frequent user of the Command Prompt with administrator privileges.

To complete this Command Prompt trick, simply create a Command Prompt shortcut on the desktop, enter the shortcut properties, and then select the command “Run as administratorFrom the checkbox on the Advanced tab.

4. Become Command Prompt Power User with the function keys

Command Prompt

The fact that with the function keys we really do something on the command line is perhaps one of the best kept secrets about the tool:

F1: Covers the last command executed (per character)
F2: Labels the last command executed (up to the character you declare)
F3: Labels the last command executed
F4: Deletes in the current line of text from the point of the cursor to the character that you declare
F5: Covers recently executed commands (not cyclically)
F6: Inserts a ^ Z at the prompt
F7: Displays a selectable list of commands executed in the past
F8: Inserts recently executed commands (cyclically)
F9: Calls the order number from the F7 list to paste

Some of the above tricks are also done with the arrow keys on your keyboard.

5. Hack the command line text

Command Prompt

Do you know that the line itself on the command line is fully customizable thanks to the command line? It is, and when we say adaptable, we mean really adaptable.

For example instead of C: \>, you can set the line to show any text you want, including the time, the current drive, the Windows version number or the name you want.

A useful example is the command "prompt $ m $ p $ g”Which will show the full drive path that you find parallel to the drive letter.

You can always run the command "promptOn its own, with no options, to return to its boring default. If you close the window and open a new one then the Windows default will appear.

Press the command "prompt /?" to see what possibilities you have about it.

6. See the help for each command

Help Key

The help command does not provide help for each command at the command line. (How stupid is this?)

However, as you have seen in the backyard, any instruction may show you a help related to it with a patch with the /? This symbol, commonly called help switch, displays information about writing this command, and several times even some examples.

7. Save the results of a command to a file

dir-command-outputAn extremely useful Command Prompt trick is to use operators that redirect a function, especially> and >>.

These small characters allow you to redirect the output of a command to a file by giving you a saved version of any data generated by the command in the command line window.

For example, suppose you're about to post a problem with the computer in an online forum and want to provide really accurate information about your computer.

An easy way to do this would be to use the SystemInfo command with a redirection operator.

For example, you can run it SystemInfo> c: \ mycomputerinfo.txt to save the information provided by the SystemInfo command in this file. You could then attach the file to the message in your forum.

8. View the entire structure of a directory on the disk

tree

With the command tree (tree), you can create a kind of map of directories on any of your computer's units.

Run the tree command from any directory to see the directory structure with its subfolder.

But with so much information generated with this command, it's probably a good idea to export the tree's results to a file so you can really see it.

For example, the command tree / a> c: \ treeresults.txt, renders the entire result to the treeresults.txt file in ASCII format (due to the / a switch).

9. Customize the title of the Command Prompt window

title

Tired of the Command Prompt window title being "Command Prompt"? No problem, just use the title command to put your own personal stamp.

For example, suppose your name is Dimitris Hatzipapacharalambidis, and you would like to express ownership of your computer on the command line then just run the command “title I belong to Dimitris Chatzipaharahalambidis”And the command line of the Command will change immediately.

The change will not be permanent so that the next time you open the Command Prompt the title bar will return to the default Windows which is the ugly "Command Prompt".

The title command is usually used to give a custom look to script files and batch files… and basically giving a title with your name may not be the best idea!

10. Copy text from the Command Line

copy

As you may know, copying text from the command line is not as easy as copying from other programs.

But what if you just want to copy a small part of the text to the clipboard? It's not too hard, but not very smart, see how it works:

1. Right-click anywhere in the command line pane and select Labeling (mark).
2.Now, select with the left mouse button what you want to copy.
3.Once your choice is made, press the key Enter.

Now you can paste the attached information to any you would like, just like her .

11. Open the command line from any position

admin

If you have ever worked with the command line for a long time, you know you may be disappointed by running the cd / chdir command again and again to get to the right directory you want to work with.

Fortunately, there is a super easy Command Prompt trick that will allow you to open a command line window from any folder you see in Windows.

All you have to do is navigate to Windows and just see the folder you want to start working with the command line.

There hold down the Shift key and right-click on the folder name you want.

In window you will notice an entry that usually does not exist: “Open a command window here".

Click this button to open a new command line window, ready and wait for you in the right place!

12. Drag and Drop for easy folder name entry

drop

Most Command Prompt commands you usually have options to specify full paths to files or folders, but typing a long path can be frustrating, especially when you lose a character and you have to start from the beginning.

For example, in Windows 7, the path to My Accessories in the menu is C:\Users\Dimitris\AppData\\Microsoft\Windows\Start Menu\Programs\Accessories. Who wants to type everything by hand?

Luckily there is a trick that makes it much easier: drag and drop. Just go from exploring Windows to the folder you want. From there, drag the folder or file to the command prompt window and leave it. Magically, the full path is placed at the command line, saving you from much typing, depending on the length and complexity of the route.

Note: Unfortunately, drag and drop mode does not work on a command line with administrator privileges.

 

13. Stop or restart another computer

shutdown

System administrators in a business environment terminate or restart their network computers all the time for many reasons and this can also be done from your computer's command line.

The easiest way to shut down a computer remotely is to run “shutdown / i”From the command prompt and the remote termination window shown above will open.

Just enter the name of the remote computer (which if you do not remember, you can learn by running the hostname command on the other computer), select what you want to do (restart or shutdown), select some other options, and then click OK.

You can also close or restart a remote computer directly from the command line with the shutdown command without using the remote shutdown window.

14. Use the Robocopy command to back up

robocopy-command

Just run it robocopy “C: \ Users \ Dimitris \ My Documents” “f: \ backup \ My Documents” / copyall / e / r: 0 / dcopy: T / mir , obviously by replacing the source and destination of the folders you want. This creates a backup to the destination that is the same as the source. The previous Robocopy command with the switches we put it works in the same way as an incremental software backup tool, keeping both synchronized positions.

You may not have the Robocopy command because you are still using Windows XP or earlier. However, you have the xcopy command, which can be used to do something similar: xcopy c: \ users \ dimitris \ documents f: \ backup \ documents \ c / d / e / h / i / k / q / r / s / x / y.

If the names of your folders have Greek characters or even worse spaces between them (like My Documents) then you should put the entire path of the disk in "", as was done in the example with Robocopy.

No matter what command you choose to use, you can just create a script file containing one of the above commands and run your schedule on the task schedule and you will have your own custom made backup solution.

We can of course use a cloud backup service today, and we recommend that you do, but there were years when the only option was to use the Robocopy command as there were only local backups . However, if you don't trust having your data on some remote computer of a cloud provider then this Command Prompt trick will come in handy.

15. See important computer network information

Command Prompt

Perhaps not only for your own information, but also for dealing with a network or Internet problem, you will need to know details about your computer's network connection.

Everything you would like to know about the network connection is available somewhere in the Windows Control Panel but is much easier to find, and much better organized, in the results of the ipconfig command.

Open the command prompt and execute the command “ipconfig / all".

The information you see on your screen is the most important for your network connection: Your IP address, host name, DHCP server, DNS information, and more, many more.

Combine this hack with the one redirection you learned above so you can easily work on the information.

16. Register a local folder just like a Network Drive

Command Prompt

The net use command is used to assign shared shares to a network as a drive letter on your computer, but did you know that there is another command that can be used to do the same thing in any folder on any of your local hard drives?

There is and is called the subst command. Just run a subst command, followed by the path of the folder you want to display as a unit.

For example, suppose you want the C: \ Windows \ Fonts folder to appear as Q:

Just run “subst q: C: \ Windows \ Fonts”And you are ready!

This trick makes accessing a specific from Command Prompt much easier.

17. See the used commands with the arrow keys

Command Prompt

Another great trick should be to use the arrow keys on your keyboard to browse past commands that were executed.

The above and below arrow keys circle the commands you have already given and the right automatically writes, character by character, the last command executed.

This may not sound so interesting, but there are many cases where the arrow keys save you incredible time.

Consider the following example: You have typed 75 characters in a command and then execute it and you find that you have forgotten to add a selection at the end. No problem, just hit the top arrow and the entire command is automatically entered in the command line pane, ready to edit it and make it work.

Tab integration is another command line trick that can save you a lot of time, especially if your command has a file or folder the name on it that you are not completely sure of.

18. Automatically complete a command with Tab

Command Prompt

Completing a Tab Command is another command line trick that can save you a lot of time, especially if your command has a file or folder that you are not completely sure about its name.

To use the integration with the Tab at the command line, simply type the command and then the part of the path that you know, but not complete. Then press the Tab button again and again to scroll through all available features.

For example, suppose you want to change the directory you are in and go to another folder, but you are not sure its name is.

Enter “cd C: \ Windows \”And then tap the tab until you see the folder you are looking for.

The results appear cyclically and you can use the SHIFT + TAB key combination to move upside down.

 

19. Find an IP address on a websiteCommand Prompt

Would you like to know the IP address of a website? You can use the nslookup command or the ping command, but the first is rather quicker.

First, let's use the nslookup command to find the google.com IP address.

Just run “nslookup google.com”And see the result. Make sure you do not confuse some private IP addresses that also appear in nslookup results with the public IP address of google.com, which is the IP address we are chasing.

Now let's try to find it using the ping command.

Run it ping google.com and then look at the IP address between the parentheses in the first line that appears. Don't worry if the ping command says "out of time" during the run, all we needed was the IP address.Command Prompt Command Prompt

Using the Command Prompt trick, the about.com's IP address appears as 216.58.210.46. You can use the same procedure with any web page or any computer name on your local network.

Try clicking on http://216.58.210.46

20. Copy & Paste easier with Quick Edit Mode

Command Prompt

Right-click on the Command Prompt title bar and select Properties. In the window that will open stay on the Options tab, and see the Editing Options section, select the “Quick edit”And then click the button OK.

Activating QuickEdit Mode is like having Mark enabled all the time, so choosing text to copy is really easy.

As a bonus, this also allows an easy way to paste anything in the Command Prompt window: just right-click once and what you have in the clipboard is pasted into the command-line window. Normally, the paste includes a right click and the Paste option, so maybe you'll be hanging out a little because it's different than you're used to.

21. Watch Star Wars Episode IV

Command PromptAs promised at the beginning of this article, you can watch an ASCII version of Star Wars Episode IV in the command line window!

Just open the Command Prompt and run “telnet towel.blinkenlights.nl“. The movie will start immediately. See the following tip if you have a problem.

It is true that this is not a productive use of the command line, nor is it really a command line trick or any command but it is certainly fun! And we can not imagine the work they have done to do all this!

Tip: The telnet command is not normally enabled in Windows, but can be enabled as a Telnet client from the Windows features through the "Control Panel" after "Programs and Features" and then in "Enable or Disable Windows Features". If you do not want to turn on Telnet but would like to watch the movie, you can watch it in your browser at Star Wars ASCIIMation.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.100 registrants.
command,prompt,windows,command line

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).