cd(1) General Commands Manual cd(1)Name
cd - change current directory
Syntax
cd directory
Description
The directory becomes the new working directory. The process must have execute (search) permission in directory.
Because a new process is created to execute each command, would be ineffective if it were written as a normal command. It is therefore
recognized and executed by the shells. In you may specify a list of directories in which directory is to be sought as a subdirectory if it
is not a subdirectory of the current directory; see the description of the cdpath variable in
See Alsocsh(1), pwd(1), sh(1), chdir(2)cd(1)
Check Out this Related Man Page
cd(1) General Commands Manual cd(1)NAME
cd - change working directory
SYNOPSIS
[directory]
DESCRIPTION
If directory is not specified, the value of shell parameter is used as the new working directory. If directory specifies a complete path
starting with or directory becomes the new working directory. If neither case applies, tries to find the designated directory relative to
one of the paths specified by the shell variable. has the same syntax as, and similar semantics to, the shell variable. must have execute
(search) permission in directory.
exists only as a shell built-in command because a new process is created whenever a command is executed, making useless if written and pro-
cessed as a normal system command. Moreover, different shells provide different implementations of as a built-in utility. Features of as
described here may not be supported by all the shells. Refer to individual shell manual entries for differences.
If is called in a subshell or a separate utility execution environment such as:
(which invokes on accessible directories) does not affect the current directory of the caller's environment. Another usage of as a stand-
alone command is to obtain the exit status of the command.
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
Environment Variables
The following environment variables affect the execution of
The name of the home directory,
used when no directory operand is specified.
A colon-separated list of pathnames that refer to directories.
If the directory operand does not begin with a slash character, and the first component is not dot or dot-dot, searches
for directory relative to each directory named in the variable, in the order listed. The new working directory is set
to the first matching directory found. An empty string in place of a directory pathname represents the current direc-
tory. If is not set, it is treated as if it was an empty string.
EXAMPLES
Change the current working directory to the directory from any location in the file system:
Change to new current working directory residing in the current directory:
or
Change to directory residing in the current directory's parent directory:
Change to the directory whose absolute pathname is
Change to the directory relative to home directory:
RETURN VALUE
Upon completion, exits with one of the following values:
The directory was successfully changed.
An error occurred. The working directory remains unchanged.
SEE ALSO csh(1), pwd(1), ksh(1), sh-posix(1), sh(1), chdir(2).
STANDARDS CONFORMANCE cd(1)
What's wrong with this script?????
Please help!!!
!#/bin/sh
echo "please enter dir"
read input
cd $input
I'm trying to make a simple script to change dir. But does not work.
it stays at the same dir where i run the script.
What did i do wrong?? (21 Replies)
I'm running Solaris 9, using the CDE gui on a SunBlade 100. I want to substitute the generic wallpapers that CDE has, with my own, i.e. my kids, dog, etc.
Suggestions? Directions??
Thanks in advance. (19 Replies)
Hi all am trying to boot the system from cdrom in single user mode , however when i am giving command boot cdrom -s i am getting below error
Boot Device: /pci@1f,0/pci@1,1/ide@3/cdrom@2,0: f file and args:
Can't read disk label
Can't open disk label package
can,t open boot device
... (17 Replies)
Hi....
cd command is not working when dual string drive/volume name is passed to cd through variables.......
For Ex....
y=/Volumes/Backup\ vipin/
cd $y
the above command gives error.......
anyone with a genuine solution ? (16 Replies)
Server need to have the OS reinstalled (5.10 SPARC) and I cannot get it to the OK prompt. I also do not have the ALOM password and I've tried several different methods to zero out the NVRAM but to no avail. There is no ALOM battery that I can pull. I'm connecting via Cutecom (like minicom) and... (18 Replies)
Hello,
First i'm Dutch, and my English is not very well. Sorry. :D
I have got a Sun Microsystems Ultra 3D (with SPARC processor). The file must be burned to a DVD. And my computer can onley read a cd.
How to get Solaris 10 on a few cds?
Please help me.
Thanks a lot..
Greets. (21 Replies)
Hello
Recently I found this (for me) really usefull tool kexec which can load a new Kernel while running one.
I tested it some times with the same kernel I was running, "rebooting" the system without powering it off at any time :D
But I need kexec basically just for live usbs. I want to start... (17 Replies)
Recently our school acquired a number of Sun Blade 100 systems from a university that was previously using them as a computational cluster. We intend to rig them to do the same thing, but they failed to give us the head node, and all the machines we have are still configured to boot from network.... (16 Replies)
Hi,
I've a question regarding a smbclient-Command in my shell script.
Here my relevant script part:
fileattr=`/opt/samba/bin/smbclient --authentication-file=$AUTH_FILE //$SMB_HOST/$SMB_SHARE 2> /dev/null
prompt off
cd $SMB_DIR
put $LOC_FILE $SMB_FILE
dir /$SMB_DIR/$SMB_FILE
... (17 Replies)
Hello,
I have a sun v880 that i got from ebay for cheap as a way to to learn Solaris and sun hardware in general.
The machine currently has OBP 4.7.0 2002/10/25 and i was wondering if there was a way to update the prom with out and active solaris install, as currently when i proceed with the... (29 Replies)
Hi,
I am in a terrible emergency. I have multiple cdr files with line count >6000.
I need to append |0| | | | | | | |random| to end of each line. The random number should never repeat.
Please help with a shell script to process all cdr's in a directory with above requirement. (23 Replies)
Hi,
I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ?
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (19 Replies)
I have a file in my Unix ( SOLARIS ) with EBCDIC format...I want this file to read in ASCII OR unicode...Is it possible with UNIX to convert this file on ASCII OR UNICODE format from EBCDIC format?
I was searching through web and found only conversion table :(
Request Rejected
Below is... (16 Replies)