[Linux common commands cd command

BASH_BUILTINS(1) 

 

cd command for switching to dirName current working directory (directory parameter).

Wherein dirName representation may be an absolute or relative path. If the directory name is omitted, the transformation to the user's home directory (the directory that is located just login).

Further, "-" is also expressed as mean home directory, "." Indicates the directory is currently located, ".." indicates the current location of the parent directory of the directory.

 

grammar:

    cd [dirName]

 

 

cd followed by relative path or absolute path , that enter the directory.

If you do not follow anything, it will enter the current user's home directory .

 

The relative path concept: not from / to start, but starting from the current directory. For example: data /, mnt / oldboy.

Absolute path concept: from / to start the catalog, called absolute path. For example: / data, / mnt / oldboy

 

: Relative and absolute paths
absolute path to the windows: E: \ Oldboy \ test.txt
Linux absolute path: cat / etc / sysconfig / network -scripts / ifcfg-eth0, the path from the root directory / began.

Guess you like

Origin www.cnblogs.com/zoe233/p/11814294.html