Sponsored Content
Full Discussion: PATH issue on linux
Operating Systems Linux Red Hat PATH issue on linux Post 302332840 by mark54g on Friday 10th of July 2009 07:41:23 AM
Old 07-10-2009
Because setting the relative path breaks things the moment you change directories and it is a bad idea. You came looking for help. People told you what you are doing is wrong.

The PATH variable is meant to be a static variable. If you choose to override that with a bad decision, by all means, do so. However, you will be the one who has to deal with it. There is no reason to use a relative path in the PATH variable. The entire purpose of the PATH is so that relative paths don't matter as you can call on any binaries in the PATH with shortened commands.

Also, if you MUST use a relative path, and thats rather ridiculous, make your path $PATH:../bin, etc.

However, thats just plain WRONG. You should set it in your path, at the END of the string and never have to worry about which directory you are in.

Last edited by mark54g; 07-10-2009 at 09:25 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

issue with PATH

hello On Debian Lenny, I first ran apt-get install git-core and then removed it to install from source. The trouble is that when I typed git --version, I am get: -bash: /usr/bin/git: No such file or directory of course, git is now in /usr/local/bin I don't understand why since... (1 Reply)
Discussion started by: JCR
1 Replies

2. UNIX for Advanced & Expert Users

library path in linux

Is there something which is an alternative to the variable LD_LIBRARY_PATH? The behaviour of this variable is that the path specified here will be checked before checking usual paths. But I want to have some folders checked for shared libraries after the usual paths. i.e usual paths have to... (3 Replies)
Discussion started by: bbala
3 Replies

3. UNIX for Dummies Questions & Answers

PLease HELP!!! PATH variable issue

Hello, I logged in to the unix solaris with my user name and then I again logged in with the sudo bash -l command now when I do echo $PATH It shows me => /usr/bin:/usr/local/bin:/usr/bin/usr/sbin:/usr/ucb:/usr/local/bin How do i find out where is this file located for setting the... (3 Replies)
Discussion started by: siddhans
3 Replies

4. Shell Programming and Scripting

LaunchAgent file path issue

This is weirdly a linux question I suppose. Im having a problem with this code the file path is fine if I don't use the ~ and put in the user /Users/tempuser/.... This will be installed on more than one computer and changing the plist for every install is going to become tedious. Is there... (1 Reply)
Discussion started by: digitalviking
1 Replies

5. UNIX for Dummies Questions & Answers

Path variable in Linux?

Hi guys, In Windows, whenever I want a execute a program using just a relative path on the command prompt, I simply edit the 'Path' variable and append my parent directory. Is there something like this available in Unix? I have a binary for Virtualbox called VBoxManage that I want to execute... (6 Replies)
Discussion started by: silverdust
6 Replies

6. UNIX for Dummies Questions & Answers

Prompt path display issue

I use the following command to print the current directory above the command prompt set prompt="`exec pwd`\n$USER@`hostname -s` %B: % > " The output is something like this <current path> $USER@hostname > But when I try to CD to any other directory and press the return key, the... (6 Replies)
Discussion started by: aelhosiny
6 Replies

7. Shell Programming and Scripting

ksh - variable to be set to windows path issue

Greetings Experts, I need to pass a parameter to ksh and the value is windows path eg: sh abc.txt C:\Users\chill3chee\Desktop No matter I try with \ delimiter, still could not get this exact value assigned to the shell variable which was checked with echo. Tried with using... (2 Replies)
Discussion started by: chill3chee
2 Replies

8. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies

9. AIX

issue AIX MPIO path closed

Hello, I have encountered the issue on my AIX 6.1. As you can see below, the hdisk1 & hdisk8 are not recognized by the system / > lspv hdisk0 00fa6d1288c820aa rootvg active hdisk1 00fa6d1288c8213c None hdisk2 ... (9 Replies)
Discussion started by: Phat
9 Replies

10. Linux

Enye issue filenaming and path

Hi All, Is there anyone encounter filenaming with Ñ or ñ reading?. Is the any other way to handle enye both redhat environment and java? We look in the log and founfout reading pathname or filename with enye Ñ, look like MONTA?O instead of MONTAÑO. We tried to transfer files from my windows... (4 Replies)
Discussion started by: lxdorney
4 Replies
SYSTEMD-PATH(1) 						   systemd-path 						   SYSTEMD-PATH(1)

NAME
systemd-path - List and query system and user paths SYNOPSIS
systemd-path [OPTIONS...] [NAME...] DESCRIPTION
systemd-path may be used to query system and user paths. The tool makes many of the paths described in file-hierarchy(7) available for querying. When invoked without arguments, a list of known paths and their current values is shown. When at least one argument is passed, the path with this name is queried and its value shown. The variables whose name begins with "search-" do not refer to individual paths, but instead to a list of colon-separated search paths, in their order of precedence. OPTIONS
The following options are understood: --suffix= The printed paths are suffixed by the specified string. -h, --help Print a short help text and exit. --version Print a short version string and exit. EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise. SEE ALSO
systemd(1), file-hierarchy(7) systemd 237 SYSTEMD-PATH(1)
All times are GMT -4. The time now is 12:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy