diff --git a/cd/cd.md b/cd/cd.md new file mode 100644 index 0000000..f8fefe7 --- /dev/null +++ b/cd/cd.md @@ -0,0 +1,37 @@ +# cd + +## Overview +`cd` is a Unix command to move a directory. It will move to the path specified by absolute or relative path. + +## Syntax +``` +cd [Folder Name] +``` +## Different functionalities of cd command : + +**cd /**: This command is used to change directory to the root directory, The root directory is the first directory in your filesystem hierarchy. + ``` + cd / + ``` + +**cd dir_1/dir_2/dir_3**: This command is used to move inside a directory from a directory + + ``` + cd dir_1/dir_2/dir_3 + ``` + +__cd__~ : This command is used to change directory to the home directory. + ``` + cd ~ + ``` + +**cd**: this command also works the same as the cd ~ command. + ``` + cd + ``` + +**cd “dir name”**: This command is used to navigate to a directory with white spaces.Instead of using double quotes we can use single quotes then also this command will work. + +``` +cd "dir name" +``` diff --git a/cd/cd.txt b/cd/cd.txt deleted file mode 100644 index ed20cec..0000000 --- a/cd/cd.txt +++ /dev/null @@ -1 +0,0 @@ -"cd" is a Unix command to move a directory. It will move to the path specified by absolute or relative path.