Sponsored Content
Full Discussion: Path variable in Linux?
Top Forums UNIX for Dummies Questions & Answers Path variable in Linux? Post 302850521 by krishmaths on Thursday 5th of September 2013 01:45:52 AM
Old 09-05-2013
You can append this directory to existing PATH variable using

Code:
export PATH=$PATH:/usr/lib/virtualbox/VBoxManage

and probably add this line to your .profile file so that this gets set every time you login.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

:: in PATH environment variable

whats the meaning of :: colon in PATH environment? /usr/local/bin:/usr/bin:/usr/local/gnu/bin::.:/usr/local/bin:/usr/bin:/usr/local/gnu/bin:/usr/local/bin and whats the meaning of // in PATH ? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies

2. UNIX for Dummies Questions & Answers

set variable PATH

Hi, i know that this topic discussed for many times but although i had researched them i couldnt succeed in my problem. i am following a step-by-step instruction guide and must do the following: ------------- To ensure access, set the path PATH $ORACLE_HOME/perl/bin:$PATH and set the Perl... (2 Replies)
Discussion started by: merope
2 Replies

3. Shell Programming and Scripting

Getting the path from a variable

Hi, I am having a variable Like line="/dir1/dir2/gr3/file.ksh" I need to get the /dir1/dir2/gr3 alone. the no of directories may differ at each time. Please advice. thanks in advance. (3 Replies)
Discussion started by: vanathi
3 Replies

4. Shell Programming and Scripting

Sed variable substitution when variable constructed of a directory path

Hello, i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem. my var1 is a string constructed like this: filename1 filerev1 filepath1 my var2 is another string constructed like this: filename2 filerev2 filepath2 when i do... (2 Replies)
Discussion started by: alrinno
2 Replies

5. Shell Programming and Scripting

remove a path from PATH environment variable

Hi I need a script which will remove a path from PATH environment variable. For example $echo PATH /usr/local/bin:/usr/bin:test/rmve:/usr/games $echo rmv test/rmve Here I need a shell script which will remove rmv path (test/rmve) from PATH... (9 Replies)
Discussion started by: madhu84
9 Replies

6. Shell Programming and Scripting

one liner to extract path from PATH variable

Hi, Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable? for eg: suppose the PATH is being set as follows PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4 ... (2 Replies)
Discussion started by: royalibrahim
2 Replies

7. Shell Programming and Scripting

Appending a path in user's PATH variable

Hello Folks, I want to append a path in user's PATH variable which should be available in current session. Background Numerous persons will run a utility. Aim is to add the absolute path of the utility the first time it runs so that next runs have the PATH in env & users can directly run... (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies

8. Shell Programming and Scripting

Path a variable to sed that includes a path

Hi I'm trying to select text between two lines, I'm using sed to to this, but I need to pass variables to it. For example start="BEGIN /home/mavkoup/data" end="END" sed -n -e '/${start}/,/${end}/g' doesn't work. I've tried double quotes as well. I think there's a problem with the / in the... (4 Replies)
Discussion started by: mavkoup
4 Replies

9. UNIX for Dummies Questions & Answers

how to make my own $PATH variable

hi all, i have to implement a mini-SHELL for a project in C++ i used "system()" to call bash functions found in $PATH i want to change this variable to $MYPATH, so, when i execute a coommand, the program will look for it in $MYPATH, not in $PATH how can i do it? Double post (0 Replies)
Discussion started by: bismillah
0 Replies

10. Shell Programming and Scripting

Creating a PATH variable

I am new to shell scripting and I ran into a couple lines of code which I don't completely understand: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/entity/bin data_dir=/usr/local/entity/projectI believe data_dir to be a more conventional link to a directory. However, I am not sure what PATH... (12 Replies)
Discussion started by: Circuits
12 Replies
Dpkg::Path(3)							   libdpkg-perl 						     Dpkg::Path(3)

NAME
Dpkg::Path - some common path handling functions DESCRIPTION
It provides some functions to handle various path. METHODS
get_pkg_root_dir($file) This function will scan upwards the hierarchy of directory to find out the directory which contains the "DEBIAN" sub-directory and it will return its path. This directory is the root directory of a package being built. If no DEBIAN subdirectory is found, it will return undef. relative_to_pkg_root($file) Returns the filename relative to get_pkg_root_dir($file). guess_pkg_root_dir($file) This function tries to guess the root directory of the package build tree. It will first use get_pkg_root_dir(), but it will fallback to a more imprecise check: namely it will use the parent directory that is a sub-directory of the debian directory. It can still return undef if a file outside of the debian sub-directory is provided. check_files_are_the_same($file1, $file2, $resolve_symlink) This function verifies that both files are the same by checking that the device numbers and the inode numbers returned by stat()/lstat() are the same. If $resolve_symlink is true then stat() is used, otherwise lstat() is used. canonpath($file) This function returns a cleaned path. It simplifies double //, and remove /./ and /../ intelligently. For /../ it simplifies the path only if the previous element is not a symlink. Thus it should only be used on real filenames. $newpath = resolve_symlink($symlink) Return the filename of the file pointed by the symlink. The new name is canonicalized by canonpath(). my $cmdpath = find_command($command) Return the path of the command if available on an absolute or relative path or on the $PATH, undef otherwise. my $control_file = get_control_path($pkg, $filetype) Return the path of the control file of type $filetype for the given package. my @control_files = get_control_path($pkg) Return the path of all available control files for the given package. AUTHOR
Raphael Hertzog <hertzog@debian.org>. 1.16.0.3 2012-04-17 Dpkg::Path(3)
All times are GMT -4. The time now is 10:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy