Symbian3/SDK/Source/GUID-89E0E8FE-6575-5A30-B25F-A873F5C5F389.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept xml:lang="en" id="GUID-89E0E8FE-6575-5A30-B25F-A873F5C5F389"><title>cd</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Change the current directory. </p> <ul><li id="GUID-0B5810A9-A1B0-56F3-9F37-21328F96CCC8"><p><userinput>cd [ -sLP ] [ arg ] </userinput> </p> <p>Changes the current directory. In the first form, change the current directory to <codeph>arg</codeph>, or to the value of <codeph>$HOME</codeph> if <codeph>arg</codeph> is not specified. If <codeph>arg</codeph> is <codeph>-</codeph>, change to the value of <codeph>$OLDPWD</codeph>, the previous directory. Otherwise, if a directory named <codeph>arg</codeph> is not found in the current directory and <codeph>arg</codeph> does not begin with a slash, search each component of the shell parameter <codeph>cdpath</codeph>. If no directory is found and the option <codeph>CDABLE_VARS</codeph> is set, and a parameter named <codeph>arg</codeph> exists whose value begins with a slash, treat its value as the directory. In that case, the parameter is added to the named directory hash table. </p> </li> <li id="GUID-EA30F198-E683-5D2C-A7EC-A9700BA5CF27"><p><userinput>cd [ -sLP ] old new</userinput> </p> <p>Here the <codeph>cd</codeph> substitutes the string <codeph>new</codeph> for the string <codeph>old</codeph> in the name of the current directory, and tries to change to this new directory. </p> </li> <li id="GUID-9FC556EA-CFF3-52C5-8F23-6C5040F3B0B4"><p><userinput>cd [ -sLP ] {+|-}n </userinput> </p> <p> <codeph> cd</codeph> extracts an entry from the directory stack, and changes to that directory. </p> <table id="GUID-AE9E862B-5F74-59F2-BD93-710531A12E8C"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>Option</entry> <entry>Description</entry> </row> </thead> <tbody><row><entry><p> <codeph>+n</codeph>  </p> </entry> <entry><p>A stack entry by counting from the left of the list shown by the dirs command, starting with zero. </p> </entry> </row> <row><entry><p> <codeph>-n</codeph>  </p> </entry> <entry><p>Counts from the right. If the <codeph>PUSHD_MINUS</codeph> option is set, the meanings of <codeph>+</codeph> and <codeph>-</codeph> in this context are swapped. </p> </entry> </row> <row><entry><p> <codeph>-s</codeph>  </p> </entry> <entry><p> <codeph>cd</codeph> refuses to change the current directory if the given pathname contains symlinks. </p> </entry> </row> <row><entry><p> <codeph>-P</codeph> or <codeph>CHASE_LINKS</codeph>  </p> </entry> <entry><p>Symbolic links are resolved to their true values. </p> </entry> </row> <row><entry><p> <codeph>-L</codeph>  </p> </entry> <entry><p>Symbolic links are followed regardless of the state of the <codeph>CHASE_LINKS</codeph> option. </p> </entry> </row> </tbody> </tgroup> </table> </li> </ul> </conbody></concept>