Sponsored Content
Operating Systems Linux Red Hat Add directory to path permanently Post 303024777 by cmccabe on Tuesday 16th of October 2018 02:43:42 PM
Old 10-16-2018
Code:
export PATH=$PATH:/usr/bin/gatk-4.0.10.1
source ~/.bashrc

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

is this not correct? II don't see where the /root/bin is coming from either. Thank you Smilie

I use/usr/bin to make it easier for others on the server to find. Thank you.

update

Code:
export PATH="$PATH":/usr/bin/gatk-4.0.10.1

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/bin/gatk-4.0.10.1

but then after exiting and re-logging in
Code:
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin


Last edited by cmccabe; 10-16-2018 at 03:50 PM.. Reason: added update
 

10 More Discussions You Might Find Interesting

1. Red Hat

permanently add static route

I have a machine with an interface that has two different addresses on CentOS 5 eth0: 10.20.21.77 eth0:1 141.218.1.221 If I issue this command I get the result I'm looking for. /sbin/route add -net 141.218.1.0 netmask 255.255.255.0 gw 10.20.21.77 ip route show dev eth0 141.218.1.0/24... (1 Reply)
Discussion started by: beaker457
1 Replies

2. IP Networking

Is there any way to add an exception for a port in the firewall setting, permanently?

Hello, I want to add a port in the firewall exception list so that my application can be accessed over network even if firewall is disabled. I am using iptables command to add exception. The problem is, after setting the rule if I change the firewall setting i.e. on/off then it is overwriting... (1 Reply)
Discussion started by: senrooy
1 Replies

3. Shell Programming and Scripting

Retrieve directory path from full file path through sh

Hi, I have a file abcd.txt which has contents in the form of full path file names i.e. $home> vi abcd.txt /a/b/c/r1.txt /q/w/e/r2.txt /z/x/c/r3.txt Now I want to retrieve only the directory path name for each row i.e /a/b/c/ /q/w/e/ How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies

4. Shell Programming and Scripting

add path variable permanently

Hi, I have added the path variable as below export... (4 Replies)
Discussion started by: burton
4 Replies

5. UNIX for Dummies Questions & Answers

Add directory to a global PATH

Guys, I did a search on this but couldn't find any thing. I need to add /home/scadm/scripts to the PATH. If I do the below it works for the session I'm in. If I close it and reopen it doesnt work. PATH=$PATH\:/home/scadm/scripts ; export PATH I also want this path added to all the... (3 Replies)
Discussion started by: miltonrods
3 Replies

6. Shell Programming and Scripting

Setting the path permanently using shell script

I'm trying to set the path permanently through a shell script. (/opt/quest/bin:/usr/bin/lab to /.profile.) I tired using echo option like below but it doesn't work. Please suggest me the right way to do so. echo "PATH=$PATH:/opt/quest/bin:/usr/bin/lab" >> /.profile (6 Replies)
Discussion started by: pjeedu2247
6 Replies

7. Shell Programming and Scripting

Can't add directory to path correctly

Hello everyone I am a newcomer to UNIX and I have hit a snag in something that would probably take experienced people about 30 seconds. Long story short I am trying to add a directory to my PATH and it is getting added but not working. I mean, the object of adding it to the path is so I can access... (2 Replies)
Discussion started by: tastybrownies
2 Replies

8. Solaris

NFS with a NAS: permanently inconsistent directory state across clients

Hi, I am having some NFS directory consistency problems with the below setup on a local (192.) network: 1. Different permissions (chmod) for the same NFS dir are reflected on different clients. 2. (more serious) an NFS dir created on client1 cannot be accessed on client2; this applies to some... (10 Replies)
Discussion started by: cosmojetz
10 Replies

9. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies

10. UNIX for Beginners Questions & Answers

What is the difference ../directory path and ./directory path in ksh?

What is the difference ../directory path and ./directory path in ksh? (1 Reply)
Discussion started by: TestKing
1 Replies
getusershell(3C)					   Standard C Library Functions 					  getusershell(3C)

NAME
getusershell, setusershell, endusershell - get legal user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the following locations of the standard system shells are used in its place: /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/ksh93 /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/pfsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/ksh93 /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh /usr/sfw/bin/zsh /usr/xpg4/bin/sh The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells. The setusershell() function rewinds the file or the list. The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells. RETURN VALUES
The getusershell() function returns a null pointer on EOF. BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved. NOTES
Restricted shells should not be listed in /etc/shells. SunOS 5.11 1 Nov 2007 getusershell(3C)
All times are GMT -4. The time now is 08:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy