Linux Bash Directories and Changing Current Working Path – POFTUT

Linux Bash Directories and Changing Current Working Path

[rps-include post=6835]

A simple shell command echo pof tut consist of command itself followed by arguments, separated by spaces. Also more complex command can be created. Generally simple commands are used and after execution exit status is provided by wait pid.

Directories and Paths

While working with bash we use paths, file names, directories etc. As you can see below there is a tilde ~ at the end of the prompt which means current working directory is home of the current user.

You may want to change directory. cd is command used to change directory. For example to change into /etc run following command.

We changed only single level directory but there are alternatives like changing more than one level directory.

Simple way to go current users home directory is just issuing cd command. After issuing command we can see tilde that means current users home directory.

As you know directories are a tree hierarchy. To go upper directory cd .. command is used. In bash .. mean upper/parent directory.

To point current working directory . is used. When calling a script that resides in current directory the following command is given.

LEARN MORE  Winmerge Tutorial With Examples To Visual Patch, Diff, Merge

[rps-include post=6835]

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)