Our network of sites >> talk | feed | free | tech | rock | xbox | homes | learn | game | pods | grab | blog | book | beep | help

What do the commands cd and mkdir mean in UNIX?

Can't wait for a free call tonight or or the free ask-by-email service? Due to time constraints, I can only take questions these days during the times that my show is on the air live. You can call with your question anytime 24/7 at 1-800-39-ONLINE (1-800-396-6546) or 1-888-488-DAVID (1-888-488-3284), even if the show is not on the air. Due to the volume of questions, response is not guaranteed.

However, if you're in a hurry, be sure to take advantage of the premium AskDavidLawrence service when you ask your question below. It's guaranteed!

David answers all questions, including those on acting, advertising, Internet scams, music, podcasting, radio, sound, television, voiceovers, the Web, and on Macintosh, UNIX and Windows computers.

Previously: Do I have to have an iPod to listen to podcasts? >>
Next: Renting Pirillo's chest again, Randy's million and Pon-tifications >>


Question:

David,

I attempted my first UNIX install recently, and simply followed the instructions to the letter.

The problem is, I didn't really learn what the commnds were, I just typed them in like some drone to get the job done.

For example, what does "cd" and "mkdir" mean. That last one looks like a Middle Eastern nickname.

Love ya!

Jared on XM

Answer:

UNIX, as you know, is not usually an operating system that uses a graphical interface (they exist, but most prefer the traditional approach). No menus, no icons, no windows to speak of. But long before there was the graphical interface, there was the command line interface.

And oddly enough, anything that a graphical interface can do, a command line interface and the commands you have at your disposal, have been doing for decades.

Take your cd command for example.

Read on... (more ahead)







That just is UNIX shorthand for change directory, something we do in Windows or MacOS when we click on a different folder, or navigate via drop down menu in an open or save dialog box.

Of course, simply typing cd isn't enough...you have to tell it which directory to change to, and that's where the rest of the command comes in, like

cd /web/htdocs

All that means is, change the directory to let me start working with whatever's in the folder called htdocs, which is inside the directory web, which is at the root of the hard drive.

The second command you asked about, mkdir, is the UNIX command for creating a new directory (folder, if you will), as in make a directory.

It's the same thing as the "new folder" menu item in MacOS or Windows.

Good luck, and if you want a terrific book to get you started in learning more about UNIX commands and how they work, try this one from my good friend Dave Taylor. If you've got a Macintosh, you can learn UNIX right on your machine:

Actually, you don't need a Macintosh - once you get a Terminal window open on your UNIX box, everything's the same!

Thanks for listening, and for asking!



Comments? Questions of your own?




Was this helpful? Buy David a Starbucks® Mocha via PayPal!

David loves his Starbucks® mocha. Skim, no whip, please. To easily and painlessly send David a selection from Starbucks® and paying via PayPal, just click on the button below your choice:

Listeners who have bought David a Starbucks® Mocha:

Chuck Craig Becky Bob Chris Dana Dean Gary Heidi Jen Jim Faucett (link?) Kevin Leo Lili Linda Michael Randy Ray Scott Sophie Sophie (II) Warren (link?)

Digg This! article or tag it at del.icio.us


Link to this article from your own website

Just copy this HTML code block. Then, paste it into your own code:





Up To The Minute Bargains



Want an e-Mini-Mall for your site?


If you need help

You can always call in to the show at the number listed above, or send David an email using the link above.


To repeat: You can always call in to the show at the number listed above, or send David email using the link above.