From 8da12ac3abf91b79fb53314ad3172d8eaf38e58c Mon Sep 17 00:00:00 2001 From: socutebunny <32743950+socutebunny@users.noreply.github.com> Date: Tue, 15 Jan 2019 13:55:31 -0800 Subject: [PATCH] Add usage and example (#26972) --- guide/english/bash/bash-cd/index.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/guide/english/bash/bash-cd/index.md b/guide/english/bash/bash-cd/index.md index b6d5c35f355..94a57c2fd7a 100644 --- a/guide/english/bash/bash-cd/index.md +++ b/guide/english/bash/bash-cd/index.md @@ -6,8 +6,13 @@ title: Bash cd **Change Directory** to the path specified, for example `cd projects`. -There are a few really helpful arguments to help with this: +### Usage +```bash +cd [dir] +``` + +There are a few really helpful arguments to help with this: - `.` refers to the current directory, such as `./projects` - `..` can be used to move up one folder, use `cd ..`, and can be combined to move up multiple levels `../../my_folder` - `-` takes you back to the previous directory you were working on. For example, `cd -` @@ -18,5 +23,12 @@ There are a few really helpful arguments to help with this: - Typing only `cd` will move to the home directory works same as `cd ~` - Typing 'pwd' will show you which directory you are currently working in. +### Example + +Change directory to `projects` folder: +```bash +cd projects +``` + ### More Information: * [Wikipedia](https://en.wikipedia.org/wiki/Cd_(command))