CD: Changes the current working directory.
PWD: Displays the current working directory name, such as where it is located in the file system.
BaseName: Displays the end portion of the file path.
DirName: Displays the part of the file path that is outside the end.
mkdir: Create directory.
RmDir: Delete Empty directory.
Rm-r: Deletes a non-empty directory and its contents.
CD command
CD [Directory]
The CD (change directory) command is used to set the current working directory:
$ cd/usr/games
When you do not specify a directory, the CD switches to your personal directory by default:
$ cd
PWD command
The PWD command is used to display the absolute path of the current working directory:
$ pwd/users/smith/mydir
basename command
basename path [suffix]
The basename command is used to display the end portion of a file path:
$ basename/users/smith/finances/money.txtmoney.txt
If you provide a file suffix name, the suffix is not displayed:
$ basename/users/smith/finances/money.txt. Txtmoney
Linux directory Operations