diff options
author | viv1 <f2012058@pilani.bits-pilani.ac.in> | 2015-10-19 02:50:55 +0530 |
---|---|---|
committer | viv1 <f2012058@pilani.bits-pilani.ac.in> | 2015-10-19 02:50:55 +0530 |
commit | 5c8942f7bcb02a59d1e0acefb0069e80de57e01e (patch) | |
tree | 3e44b114da60a8db37ce473e11f5a1b0fffa3a21 /bash.html.markdown | |
parent | ba5f3ebc112b52797a9a21fdbba1846885feac2c (diff) |
[bash/en]...Added info on changing directories
Diffstat (limited to 'bash.html.markdown')
-rw-r--r-- | bash.html.markdown | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bash.html.markdown b/bash.html.markdown index 211d2944..dfbf9a89 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -130,6 +130,15 @@ ls -l # Lists every file and directory on a separate line # .txt files in the current directory: ls -l | grep "\.txt" +# Since bash works in the context of a current directory, you might want to +# run your command in some other directory. We have cd for changing location: +cd ~ # change to home directory +cd .. # go up one directory + # (^^say, from /home/username/Downloads to /home/username) +cd /home/username/Documents # change to specified directory +cd ~/Documents/.. # still in home directory..isn't it?? + + # You can redirect command input and output (stdin, stdout, and stderr). # Read from stdin until ^EOF$ and overwrite hello.py with the lines # between "EOF": |