Wednesday, February 20, 2013

Navigation


Know your current working directory

To know about the current directory you are working with, just type pwd (print working directory) and hit enter key. The output is like in the snapshot below.
ImageThis shows that my current working directory is "/home/binod".
So, this shows your current directory. What if , if you want to change your directory? Here goes the solution.

Changing the directory

To change the directory using terminal, type cd <path name>.  The pathname can be Absolute or relative to current working directory. As for example if I have to change my directory to the Desktop from my current working directory, what i have to do is:
Imageso this changed my current working directory to the Desktop.
[Note: if you simply type "cd" and hit enter key, the working directory will changed to "home" directory. (also try "cd  ~" and "cd  /")]
for full details see man page for cd ("type "man cd")


List the directory contents

The command lists the contents of the directory specified by the user. By default, It lists the contents of the current working directory.
To list the directory contents type "ls" in the terminal.Image
for full details see man page for ls ("type "man ls")

No comments:

Post a Comment