Tales of a Dreamer

Entries categorized as ‘linux’

Setting the $PATH environment variable in Linux

July 2, 2008 · 2 Comments

To view the current path, either of the following commands work:

1.
$ echo $PATH

or

2.
$ set | grep PATH

To set the $PATH  environment variable in Linux (add a new directory to the current path while retaining the other directories):

$ export PATH=$PATH:<new_directory>

Below is a sample screen display:

$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/user/bin

$ export PATH=$PATH:/home/user/temp
$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/user/bin:/home/user/temp

Categories: linux
Tagged: , ,

viewing the disk space usage in linux

September 17, 2007 · Leave a Comment

df -h

the -h parameter is used so that output will be in human-readable format 

Categories: linux

finding files in linux

September 17, 2007 · Leave a Comment

how to find files in linux? use ‘find’!

here’s a sample usage:

user@machine]$ find / -name core*

 the above command is used to find filenames starting with the string “core” followed by 0 or more characters.

other sample usages of the find command can be found in http://www.codecoffee.com/tipsforlinux/articles/21.html

Categories: linux