Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


The "cd" Command

July 19, 1998

Cool, so now you know where you are. However, that doesn't really do much for you. What you need to be able to do is move from where you are to someplace else. To do so, you will use the "cd" (change directory) command which is described in the table below:

Syntax Options Example Description
cd option Directory name cd /home/selena/Test Changes the present working directory

As you can see, the "cd" command simply takes a directory name as an option and works something like the following image in which we have changed our directory from "/home/selena" to "/usr/bin/"

[CD Command Example]

Of course you can use relative path names with the cd command such as in the following example in which we will change directories using both relative and absolute references.

[CD Command Example with relative Examples]

Why not try a few out for yourself. Start by logging in and using the "pwd" utility to get your bearings. Then try moving around. Here are some interesting things to try... (remember to use pwd after the "cd" command so that you can clearly see the effect of the command).

Command Explanation
cd / Goes directly to the root directory
cd Moves you from anyplace on the system directly to your home directory
cd .. Moves you one directory up
cd /usr Moves you directly to the /usr directory
cd /usr
cd lib
Moves you to the /usr directory and then moves you to the lib sub-directory relative to bin.

Additional Resources:

The "pwd" Command
Introduction to UNIX for Web Developers | Table of Contents
The "ls" Utility (And Hidden Files)


Up to => Home / Internet / UNIX / Intro




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers