Linux Bash Directories and Changing Current Working Path

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-bash-directories-changing-current-working-path/
PINTEREST
PINTEREST
INSTAGRAM
  1. Introduction To Linux Bash Programming
  2. Linux Bash Directories and Files
  3. Linux Bash Environment Variables
  4. Linux Bash Variables
  5. Linux Bash Functions
  6. Linux Bash If Else Conditionals
  7. Linux Bash Create and Run Script Files
  8. Linux Bash Operators
  9. Linux Bash Arrays
  10. Linux Bash Input, Output and Redirection
  11. Linux Bash History
  12. Linux Bash Alias
  13. Linux Bash .bashrc File
  14. Linux Bash Debugging

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.

LEARN MORE  How To Compress Files and Folders In File System Level With Compact Command In Windows NTFS?

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

  1. Introduction To Linux Bash Programming
  2. Linux Bash Directories and Files
  3. Linux Bash Environment Variables
  4. Linux Bash Variables
  5. Linux Bash Functions
  6. Linux Bash If Else Conditionals
  7. Linux Bash Create and Run Script Files
  8. Linux Bash Operators
  9. Linux Bash Arrays
  10. Linux Bash Input, Output and Redirection
  11. Linux Bash History
  12. Linux Bash Alias
  13. Linux Bash .bashrc File
  14. Linux Bash Debugging
RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-bash-directories-changing-current-working-path/
PINTEREST
PINTEREST
INSTAGRAM

Leave a Reply

Your email address will not be published.