Scripts - jQuery / Diversen - Commandline tips

Commandline tips

Wipe Free Disk Space // Delete all

It's no secret (or at least, it shouldn't be) that when you delete files or folders in Windows, they're not actually erased-the space they took up is simply marked as "available for use," which allows the files to be recoverable (with the right software) until they're overwritten with new data.

There is a utility built-into Windows (even XP Pro and Vista) that will overwrite all the free space on a hard drive, insuring any files you've deleted stay dead.
Launch a command prompt and type cipher /w:X where X is the letter of the drive or partition you want to wipe.
Be patient - the process can take a long time if you have a lot of free space.
Toets Omschrijving
F1: Pastes the last executed command (character by character)
F2: Pastes the last executed command (up to the entered character)
F3: Pastes the last executed command
F4: Deletes current prompt text up to the entered character
F5: Pastes recently executed commands (does not cycle)
F6: Pastes ^Z to the prompt
F7: Displays a selectable list of previously executed commands
F8: Pastes recently executed commands (cycles)
F9: Asks for the number of the command from the F7 list to pas

Save a Command's Output to a File

An incredibly useful Command Prompt trick is the use of redirection operators, specifically the > and >> operators.

These little characters let you redirect the output of a command to a file, giving you a saved version of whatever data the command produced in the Command Prompt window.

For example, let's say you're about to post a computer problem to an online forum and you want to provide really accurate information about your computer. An easy way to do that would be to use the systeminfo command with a redirection operator.

For example, you might execute systeminfo > c:\mycomputerinfo.txt to save the information provided by the systeminfo command to a file. You could then attach the file to your forum post.

View a Drive's Entire Directory Structure

I think one of the neatest little commands is the tree command. With tree, you can create a kind of map of the directories on any of your computer's drives.

Execute tree from any directory to see the folder structure under that directory.

Tip: With so much information, it's probably a good idea to export the results of the tree command to a file. For example, tree /a > c:\treeresults.txt

Copy From the Command Prompt

As you may or may not know, copying from the Command Prompt is not as easy as copying from other programs, which is part of the reason why saving a command's output to a file, is so handy.

But what if you do just want to copy a short section of text to the clipboard? It's not too hard but it's not very intuitive either.

Right-click anywhere in the Command Prompt window and choose Mark. Now, highlight with your left mouse button whatever you'd like to copy. Once your selection is made, press Enter.

Now you can paste that information into whatever program you'd like.

Open the Command Prompt From Any Location

If you've ever worked in the Command Prompt for very long, you know that it can be really frustrating executing the cd/chdir command over and over again to get to the right directory you want to work from.

Luckily, there's a super easy Command Prompt trick that will let you open a Command Prompt window from whatever folder you're viewing in Windows.

All you have to do is navigate, in Windows, to the folder you want to start working from in the Command Prompt. Once there, hold down your Shift key while you right-click anywhere in the folder. Once the menu pops up, you'll notice an entry that's not usually there: Open command window here.

Click it and you'll start a new instance of the Command Prompt, ready and waiting at the right location!

If you're a Command Prompt power user, you'll immediately recognize the value in this little trick.

Zoek pagina:

Calender / Nieuws

« September 2017 »
Nr Zo Ma Di Wo Do Vr Za
35     12
371011121314 15 16
38 1718 1920212223
39 24252627282930

Website info

Laatste update

22 Aug.
21 Aug.
26 Mei
27 Jan.


Totaal aantal: 217 pagina's.
Bijgewerkt: 22-08-2017.

Leiden - Meer weer in Altijd jouw weer