Saturday, October 17, 2009

A Beginners Guide To The Windows Command Line

A Beginners Guide To The Windows Command Line: "

command lineThis is not another post about smilies. This article deals with the Windows command line.


The command line lets you communicate directly with your computer and instruct it to perform various tasks. For this you have to use specific commands. The commands are not necessarily intuitive, so they have to be learned, just like words in a language. Fortunately, there are graphical user interfaces (GUIs) replacing most procedures that formerly required using the command line.


However, sometimes using the command line is quicker or even the only way to access certain information. Thus knowing how to use the command line can be extremely valuable. And that’s where this Windows command guide comes in.


To access the Windows command line in XP, click > START > Run, type cmd into the > Open: field, and click > OK.


run




Alternatively, you can go through > Start > All Programs > Accessories and select > command prompt.


This launches cmd.exe, a window that reminds us of the old days in computer history: pure white text on a uniform black background. Despite its resemblance to a DOS windows, cmd.exe merely is a command line interpreter merely similar to DOS.


command prompt


Now that you have successfully accessed the command prompt, what is there to do here?


To operate at command prompt level, you need to know some commands. Let me give you some basics to play with.


Help


First let me say that there is intrinsic help in the command prompt. If you’re not sure whether a certain command really exists or what it does or what switches there are to it, type the command followed by a /? and you shall be enlightened.


Switches


Switches are optional extensions to a command, which change the command’s behavior. We actually saw an example of a switch in the previous section. /? is a switch to any command, explaining its function rather than executing it in any way.


Note that you can add several switches to each command, but always leave a space between the command and each switch.


Now let’s get on with serious commands.


dir


The dir command lists the contents of the current directory.


There are some useful switches to it. For example dir /d (/d being the switch) will list the directory contents in up to three columns. Alternatively, you can use dir /w, which will sort the contents differently. With dir /p the information doesn’t scroll, but pauses at the end of the screen, until you hit a random key for the next screen full of data.


dir


cd


To change directories, use the cd command.


Pick a directory seen in the previous dir listing. Directories are indicated by <DIR> in the directory listing. For example type cd desktop and you will switch into the Desktop directory. Type cd.. to return to the previous directory. To go directly to a specific directory, rather than haggling your way through each single one, type in the entire path. Let’s say you went back to C:\> and want to return to the Desktop directory. Simply type cd documents and settings\administrator\desktop.


Note that switching between drives doesn’t require the cd command. Simply type in the respective drive letter and a colon, e.g. d: to switch.


mkdir


This one is used to make a directory, i.e. create a new directory. Type mkdir name to create a directory called name.


rmdir


To remove a directory, use this command. So that would be rmdir name to remove a directory called name. Only empty directories can be removed.


You can of course create and delete directories located in any other directory, you just have to specify the respective path in your command, starting from where you are.


For example mkdir documents and settings\administrator\test when you’re in C:\ or mkdir administrator\test if you’re already in the documents and settings directory.


del


This is the command to delete files. It works similar to the mkdir and rmdir commands. So you type del example.exe to delete the file example.exe in your directory. If you’re not already in the right directory, you add the respective path.


This was a short list of commands to make you familiar with the command line environment. For an entire list of commands, please refer to this list.


command prompt


We will now look at some very helpful commands for tasks that can not easily be completed by any other means. For all of them you can use the /? switch, to find out what all you can do with these commands.


driverquery


For a list of all drivers installed on your system, driverquery is the quickest solution.


ping


Ping must be the most popular command line prompt. It’s used to check an IP address and see whether the respective computer is online or responding, i.e. whether network communication between your and that computer is possible.


ipconfig


Here you can reveal network data of your own computer, such as the name of your computer in the network, your IP address or your MAC address.


systeminfo


The command to retrieve extensive information about your system, including Windows serial number, computer model, and available RAM.


This Windows command guide can merely touch on the surface of what the command line can do. For more extensive information, please refer to The Command Line in Windows and PCStats’ WindowsXP Command Prompt Guide.


If you got hooked, you might want to check out the following MakeUseOf articles dealing with the command line. Varun wrote about 10 Windows Command Line Tips You Should Check Out and he introduced Nircmd – A Power Packed Command Line Tool. Mark explained how to Change the Windows User Password via Command Line.


What command do you find most useful?


Windows command guide


Related posts






"

Thursday, July 23, 2009

A Happy Surprise: Bean and Farro Soup « Pink of Perfection

A Happy Surprise: Bean and Farro Soup « Pink of Perfection: "Bean and Farro Soup
Serves 6-8

I was so craving protein the night I ladled this out and snapped the photo that I topped the soup with a poached egg and a little grating of Grana Padano just for fun. Definitely not necessary, but it will make the soup that much heartier.

1 tablespoon olive oil
1 onion, chopped
3 gloves garlic, chopped
2 stalks celery with leaves, chopped
3 carrots, chopped
1 teaspoon dried basil
1 teaspoon dried rosemary
1/4 teaspoon crushed red pepper
1/4 teaspoon dried rubbed sage
5 cups chicken broth
1 14.5 ounce can diced tomatoes, with juices
1 14.5 ounce can kidney beans, drained and rinsed
1 14.5 ounce can chickpeas, drained and rinsed
1 cup farro

In a large soup pot, heat olive oil over moderately high heat, then sauté onion, garlic, celery and carrots until onion is translucent. Add basil, rosemary, crushed red pepper, sage, and chicken broth. Stir in tomatoes, kidney beans, chickpeas, and farro. Raise heat, bring soup to a boil, then reduce and simmer until farro is tender."

Basics: Chocolate Chip Cookies « Pink of Perfection

Basics: Chocolate Chip Cookies « Pink of Perfection: "Chocolate Chip Cookies
from Words to Eat By
makes about 2 dozen cookies

To be totally fair, in Debbie’s directions at Word to Eat By, she calls for refrigerating the dough. Does anyone know what that would do? I didn’t have an hour to spare and was in a mad dash to make these and ship them off in a care package, but possibly the refrigeration is the one missing step in getting me to my perfect cookie.

1 1/2 cups all purpose flour
1/2 teaspoon baking soda
1/2 teaspoon salt
1/2 cup (1 stick) cold unsalted butter, cut into 1/2-inch pieces
1/2 cup sugar
3/4 cup tightly packed light brown sugar
1 1/2 teaspoon vanilla extract
1 large egg, at room temperature, lightly beaten
7 oz bittersweet chocolate, cut into 1/2 inch chunks

Preheat oven to 350 F. Adjust racks to lower and upper thirds of the oven.

Sift together the flour, baking soda, and salt into a medium bowl and set aside.

Cream the butter and sugars on low speed until it is smooth and creamy. Mix in the vanilla and egg and beat on low speed until fully incorporated. On low speed, add the flour mixture. Beat until just incorporated. Scrape down the sides of the bowl. Stir in the chocolate chunks.

Line two baking sheets with parchment paper or Silpats. Spoon dough onto baking sheets by heaping tablespoons, leaving a few inches between cookies. Bake for 11-13 minutes, or until golden brown around the edges, turning the sheets front to back and switching racks halfway through.

Remove the sheet from the oven and carefully slide the parchment or Silpats directly onto a work surface. When cookies are set, remove them to a cooling rack. Wait at least 5 minutes before serving or 20 minutes before storing in an airtight container for up to 3 days at room temperature."

French Lady Onion Tart « Pink of Perfection

French Lady Onion Tart « Pink of Perfection: "Onion Tart
Serves 4-6

for the pâte brisée
from Chocolate and Zucchini

1 1/3 cups all-purpose flour
1/2 teaspoon salt
8 tablespoons chilled unsalted butter, diced
1 large egg, lightly beaten
ice cold water

In a food processor, combine the flour and the butter. Run it for about ten seconds, until you get a breadcrumb consistency. Add in the egg and mix again until it forms a ball. If the dough is still a little dry, add in a little water, a tiny splash at a time, until the dough comes together. Turn out the dough onto a well-floured surface, gather into a slightly flattened ball shape, wrap with plastic, and refrigerate for 30 minutes.

Remove from fridge and let sit at room temperature for about 10 minutes. On a floured work surface, roll out to fit a 9-inch tart pan, and transfer to said pan. Cut off excess dough.

for the tart filling
from Gourmet

1/3 cup olive oil
2 teaspoons fennel seeds
3 pound yellow onions, halved and thinly sliced
1 tablespoon Dijon mustard
1/2 cup grated comté

Heat oil in a 12-inch heavy skillet over medium-high heat until it shimmers, then sauté fennel seeds until a shade darker, about 30 seconds. Stir in onions, teaspoon salt, and 1/2 teaspoon pepper, then reduce heat to medium-low and cover onions directly with a round of parchment paper (I just covered with the lid of the skillet for the first 45 minutes or so and then continued to cook the onions uncovered thereafter). Cook, stirring occasionally, until onions are very tender and golden brown, 1 to 1 1/4 hours.

Preheat oven to 375 degree F with rack in middle.

Brust tart dough with mustard and pour in the cooked onions. Sprinkle with the cheese. Bake for 30-35 minutes until edges of tart are golden brown."

Like-A-Dream Hot Chocolate « Pink of Perfection

Like-A-Dream Hot Chocolate « Pink of Perfection: "Hot Chocolate
Orangette’s adaptation of Dorie Greenspan’s Paris Sweets and Ladurée

1 ½ cups whole milk
2 ½ tablespoons water
2 ½ tablespoons granulated sugar
3 ounces bittersweet chocolate, finely chopped

In a medium saucepan, combine the milk, water, and sugar. Place over medium heat and whisk occasionally until the sugar is dissolved. Increase the heat to medium-high and bring the mixture just to a boil. Remove the pan from the heat and whisk in the chocolate. At this point, blend the mixture. If you have an immersion blender, you can do this directly in the saucepan; if not, you’ll need to transfer it to a traditional blender. Either way, blend for 1 minute (on high speed, if using a traditional blender - and take care(!), as hot liquids expand when blended). The finished mixture should be very smooth and frothy."

Quick Mustard Pork Chops and Loving Nigella Lawson « Pink of Perfection

Quick Mustard Pork Chops and Loving Nigella Lawson « Pink of Perfection: "Mustard Pork Chops and Gnocchi
adapted from Nigella Express
Serves 2

2 pork chops, each about 6-8 ounces and 1/2 inch thick
2 teaspoons olive oil
1/2 cup pilsner-style beer
1 tablespoon dijon mustard
1 tablespoons butter
8 ounces frozen gnocchi

Season pork chops with salt and pepper. Heat olive oil over moderately-high heat. Cook pork chops, about 2 minutes per side, until they’ve taken on a golden-brown char and are cooked through. Remove to a plate and cover to keep warm.

Deglaze the pork chop pan with the beer, scraping up any browned bits. Let bubble for about a minute, before stirring in butter and mustard. Pour most of the sauce over the two pork chops, leaving a little in the pan.

Bring a large pot of water to a boil and cook gnocchi until it floats, about 2-3 minutes. Drain the gnocchi before scooting them through the remaining mustard sauce and serving with the pork chops, and an arugula salad, if you like green things as much as I do. A practically instant supper."

Pork Chops with Apples and Shallots « Pink of Perfection

Pork Chops with Apples and Shallots « Pink of Perfection: "Pork Chops with Apples and Shallots
adapted from Everyday Food
Serves 2

1 tablespoons butter
1/4 pound medium shallots, quartered lengthwise
1 Granny Smith apples, peeled, cored, and cut into eighths
1/4 cup white wine (all I had was just a drop of Lillet and it was so good in this)
1 sprig fresh thyme (if you have it)
2 pork rib chops (each 1/2 inch thick and 6 to 8 ounces)
coarse salt and ground pepper

Heat broiler; set rack 4 inches from heat. In a large skillet, melt butter over medium-high. Add shallots and cook, stirring occasionally, until browned, about 5 minutes. Cover pan and reduce heat to medium. Continue cooking until shallots are soft, about 5 minutes more.

Add apples, wine, and thyme, cover, and cook until apples are beginning to soften, about 5 minutes. Uncover and cook, stirring, until most of the liquid has evaporated and apples are tender, 2 to 4 minutes more. Taste season with salt and pepper, if needed. Remove from heat and cover to keep warm.

While apples are cooking, season pork chops generously with salt and pepper; place on a rimmed baking sheet. Broil until cooked through, 3 to 5 minutes per side. To serve, spoon warm apple mixture over chops."

Seven Vegetable Couscous with Chunky Onion Harissa « Pink of Perfection

Seven Vegetable Couscous with Chunky Onion Harissa « Pink of Perfection: "Seven Vegetable Couscous with Chunky Onion Harissa
adapted from Bon Appetit

I know the list of ingredients looks daunting, but you can really think of this recipe as a blueprint, to substitute whatever vegetables you have on hand or look best at the store. Just make sure you don’t cut down on the volume of vegetables — you want this to be chock-full of fresh flavors.

Another note: I liked the idea of this harissa, but would make changes next time around (not sure about the vinegar or all the onions), maybe seeking out a more traditional harissa recipe to whip up in the food processor or just buying a tube.

for the couscous:
2 tablespoons olive oil
2 large leeks (white and pale green parts only), minced
4 large garlic cloves, chopped
2 1/4 cups chicken stock or canned broth
1 cup golden raisins
1 cup 1/2-inch cubes peeled butternut squash
1 large yellow squash, cut into 1/2-inch cubes
1 large zucchini, cut into 1/2-inch cubes
3/4 cup frozen baby lima beans, thawed
1 teaspoon turmeric
1/2 teaspoon ground ginger
1/4 teaspoon cayenne pepper
1 cup halved grape tomatoes
3/4 cup frozen peas, thawed
1/2 cup coarsely chopped fresh cilantro
1 1/2 cups (about 10 ounces) couscous
lemon wedges

for the harissa:
1/4 cup tomato paste
1 tablespoon plus 1 teaspoon dried crushed red pepper
3/4 teaspoon cayenne pepper
1/2 cup olive oil
1/4 cup red wine vinegar
6 green onions, chopped
1 small red onion, chopped
2 large garlic cloves, minced

to make the couscous:
Heat oil in heavy large Dutch oven over low heat. Add leeks and garlic. Cover and cook until leeks are very tender but not brown, stirring occasionally, about 10 minutes. Add stock and next 8 ingredients. Season with salt and pepper. Increase heat and bring mixture to boil. Cover, reduce heat to medium and simmer until vegetables are crisp-tender, about 5 minutes. Mix in tomatoes, peas, cilantro, then couscous. Remove from heat. Cover and let stand 10 minutes.

Fluff couscous with fork. Serve with lemon wedges and a spoonful of harissa.

to make the harissa:
Combine tomato paste, crushed red pepper and cayenne pepper in bowl. Gradually whisk in oil. Whisk in vinegar. Mix in onions and garlic. Season generously with salt and pepper. (Can be prepared 8 hours ahead. Let stand at room temperature. Stir harissa well before using.)"

Red Lentil Soup with Lemon and Caramelized Onions « Pink of Perfection

Red Lentil Soup with Lemon and Caramelized Onions « Pink of Perfection: "Red Lentil Soup with Lemon and Caramelized Onions
Serves 2

3/4 cup red lentils
1 cup chicken stock
1 cup water
pinch cayenne
1/4 teaspoon turmeric
salt
pepper
1 tablespoon lemon juice
1 1/2 tablespoon chopped parsley

1 small onion, sliced thin
1 tablespoon butter
1 teaspoon sugar

To caramelize the onions, melt the butter over moderate heat. Throw in the onion and cook until beginning to brown. Sprinkle sugar evenly over onions and continue to cook until onions are brown, sweet, and sticky.

Meanwhile, in a small saucepan, combine lentils with water, stock, cayenne, turmeric, salt, and pepper. Bring to a boil, then reduce heat and simmer until lentils are soft and beginning to break down. Turn off heat, and stir in chopped parsley and lemon juice. Ladle into bowls and serve with caramelized onions."

Spring Dinner For Two « Pink of Perfection

Spring Dinner For Two « Pink of Perfection: "Sauteed Chicken in Mustard-Cream Sauce
from Everyday Food
Serves 4

4 boneless, skinless chicken breasts (6 ounces each)
1/4 teaspoon salt
1/4 teaspoon pepper
2 tablespoons olive oil
1/4 cup dry white wine, or chicken broth
1/2 cup heavy cream (I used half and half with fine results)
2 tablespoons Dijon mustard
1 teaspoon dried tarragon (or 1 tablespoon chopped fresh)

Sprinkle chicken breasts with salt and pepper. In a large skillet, heat oil over medium-high heat. Add chicken; saute until cooked through, 10 to 12 minutes, turning once. Transfer to a plate; keep warm.

Pour wine into hot skillet; cook, stirring, until reduced by half, about 1 minute. Whisk in cream, mustard, and tarragon. Cook, whisking, until thickened, about 2 minutes.

Pour any accumulated chicken juices into sauce. Right before serving, drizzle cream sauce over chicken. Serve with steamed asparagus."