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.
$ echo pof tut pof tut
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.
[[email protected] ~]$
You may want to change directory. cd is command used to change directory. For example to change into /etc run following command.
[[email protected] ~]$ cd /etc [[email protected] etc]$
We changed only single level directory but there are alternatives like changing more than one level directory.
[[email protected] ~]$ cd /etc/systemd/ [[email protected] systemd]$
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.
[[email protected] etc]$ cd [[email protected] ~]$
As you know directories are a tree hierarchy. To go upper directory cd .. command is used. In bash .. mean upper/parent directory.
[[email protected] ~]$ cd .. [[email protected] home]$
To point current working directory . is used. When calling a script that resides in current directory the following command is given.