5 you must known cmd tips tricks

 5 you  must known cmd tips tricks

CMD ( Command Prompt)

Now if your work revolve around computers like programming or app development or even when we do simple tasks like Troubleshooting your internet, or rooting your android then we have to use cmd, in some way or the other So, here are

5 lesser known cmd tips tricks that are actually useful in practical situation. Let’s get started.

But before this let us know what is cmd in short. CMD full form is Command prompt. In windows 10 operating system this application is very powerful but many of us don’t know about. We can operate whole windows 10 from this powerful application with the help of many commands 

1. How to open CMD,




Now most of you already know How to open a cmd. basically, you type cmd on start menu and

Hit enter or press Win+R to open run box and then type cmd and hit enter And this will open your command prompt in the current user directory.

Quite basic stuff. Right?

                             

But sometime, you will need to open cmd in different directory. Like say, if you are rooting your android then you will have to open cmd in c drive.

Now you can always use a cd command and navigate to any directory.

but there is quicker way. hold down the shift key and right click on the explorer window then select ‘open cmd here’ option. And this will open cmd in that current directory.

Or what I like to do is, type cmd in the explorer address bar and press enter 

This will do the same thing. But, do you know you can also executes the commands directly from windows run box, For instance,

When you want to check if the internet is up or not you open the cmd and ping a website like google. And if you get a reply this means your internet is working,

Now for me, I often use this command to check my internet connectivity or let say you use any other command quite frequently, so for that you can run the same command directly from run box

by typing cmd /c followed by the command

like for this instance

cmd /c ping google.com and hit enter.

                             

So, this will open the cmd, carry out the instruction and close the window



If you keep the windows open then replace /c with /k  

Now, the beauty of this trick is RUN box stores history, so next time you want to carry out same command simply open run box and use the up/down arrow key. Also, you can use it to automate for other stuff.

Like,

I often use it to open multiple programs with cmd without having to create the .bat file

Overall, this can come in handy, if you know how to use it right.

 

2. Schedule a Shutdown

Now, I know most of you already know about it but still it’s so useful that it’s worth mentioning again. So let say you are watching a movie or downloading a large file.. But after some time you start feeling sleepy and now you would like to schedule a shutdown.

So how do you do it?

Well, you can always use a software if you want but there is a build in command as well.

Simply open your cmd and type in

Shutdown -s -t 3600




and it will shutdown your computer in hour. but say, later you decided to abort or cancel it

then type

shutdown –a




now you can also use this command to schedule a restart by using different parameter So how do I know which parameter should I use? Well, you can always type in the command

followed a space and then the keyword help this works for all the commands in cmd.

                                   

Overall, I use this shutdown quite a lot when I work at night and make sure my computer automatically turn off once the work is done. And BTW, this command also works in Linux and mac terminal.

 

3. Find out history of commands

Usually, when using a command prompt we use the same command with some modification.

Like say, if I want to check my internet connection then I will do

ping google.com

Now, say I want to continuously monitor my internet traffic for that, I will add the -t parameter.


But instead of typing the whole command once again, what I can do is use the up and down arrow key. To see my previous used commands. But, I know most you already know that.

However, this up/down arrow key become tedious if have used too many commands then you can type doskey /history and it will list all the commands.

But even then, you have to manually copy them in order to use them. So instead press f7 key what I like do is that you will be able to switch between commands and hit enter to execute them

 

4.  How to make cmd window full screen

Sometimes, you need to use cmd in full screen but from Windows vista onwards, cmd can’t be made full screen due to introduction of display drivers. Now you can always turn of the display drivers and then made the cmd full screen. But there is a better way to do that.

Open cmd and type in wmic



short for

(Windows Management Instrumentation Command-line (WMIC).) and hit enter.

Now, if you press the resize button  we have the full screen. But we don’t have to use this command anymore, so let’s close it by typing exit. And you can still resize your window the way you want But Off course this full screen feature will only work for current cmd session.

 

5. How to copy stuff on cmd

Unlike mac or linux terminal cmd do not have out of the box support for copy and pasting but that quite important? for instance, Say you want to copy command from a web page to

your cmd or sometimes you want to copy your command’s output to a text file So how do we do that?

Well there 3 ways to copy stuff,

1> You have to enable quick edit, which is turn off by default

To do that Right click on cmd's border and under option




select 'quick edit'.

                             

Now you can copy stuff from outside and if you right click in the cmd, it will be pasted in the cmd. Similarly, to copy from within, highlight the text using your mouse and then while holding your mouse hit ctrl+c to copy the stuff on clipboard.

 

2> way to copy text is by using the clip command. like if I want to copy the output of

ipconfig, without typing that on the screen then type

ipconfig | clip



and this will copy the output on the clipboard without putting anything on the screen.

 

3> and probably the best time saver method is to use the pipe command For instance

Say I my friend ask me what movies I have so, I can quickly give me list by going to my movie folder open cmd and type

dir > movies.txt



and this will save the name in the text file called movies

which I can mail him easily. Now, you this is just one practical example but you can use it to save logs of your commands. Overall, I used it less, but when I do, it save a lot time when needed. Well these were some time saving tips and tricks for cmd.


Note:-

If you have any suggestions or want to ask question please comment below.

0 comments:

Post a Comment

Please do not enter any spam link in the comment box.

Techno Trickss © 2020 - Designed by Aman Mishra