Sponsored Content
Top Forums Shell Programming and Scripting add path variable permanently Post 302656499 by joeyg on Thursday 14th of June 2012 07:49:59 PM
Old 06-14-2012
depends on your hardware and operating system

What hardware?
What unix system?

That will determine the login file(s) that could be modified to make this permanent.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

add bin to variable PATH and save changes

i wrote a script and is running. I add the path bin to variable PATH, i.e. PATH=$PATH/bin. i add this to PATH in order to run the script in any path working directory. Thats ok. The problem is as son as i close the session and start a new session, changes are lost. How can i tell the shell or... (1 Reply)
Discussion started by: alexcol
1 Replies

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. Shell Programming and Scripting

how to add a path variable

Hi, I tried to add a path vairable export GPLOAD_CONNECT_STR= -U crm -h sdc-gp1-dev1 -d wmgpdev but it throws the below error -bash: export: `-U': not a valid identifier -bash: export: `-h': not a valid identifier -bash: export: `sdc-gp1-dev1': not a valid identifier -bash: export:... (2 Replies)
Discussion started by: burton
2 Replies

9. 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

10. Red Hat

Add directory to path permanently

I ssh in and am trying to add a directory permanently to $PATH in centos 7 and having issues. My current $PATH is echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin but when I do a sudo nano ~/.bashrc # .bashrc # User specific aliases and functions alias... (7 Replies)
Discussion started by: cmccabe
7 Replies
msync(3C)						   Standard C Library Functions 						 msync(3C)

NAME
msync - synchronize memory with physical storage SYNOPSIS
#include <sys/mman.h> int msync(void *addr, size_t len, int flags); DESCRIPTION
The msync() function writes all modified copies of pages over the range [addr, addr + len) to the underlying hardware, or invalidates any copies so that further references to the pages will be obtained by the system from their permanent storage locations. The permanent storage for a modified MAP_SHARED mapping is the file the page is mapped to; the permanent storage for a modified MAP_PRIVATE mapping is its swap area. The flags argument is a bit pattern built from the following values: MS_ASYNC perform asynchronous writes MS_SYNC perform synchronous writes MS_INVALIDATE invalidate mappings If flags is MS_ASYNC or MS_SYNC, the function synchronizes the file contents to match the current contents of the memory region. o All write references to the memory region made prior to the call are visible by subsequent read operations on the file. o All writes to the same portion of the file prior to the call may or may not be visible by read references to the memory region. o Unmodified pages in the specified range are not written to the underlying hardware. If flags is MS_ASYNC, the function may return immediately once all write operations are scheduled; if flags is MS_SYNC, the function does not return until all write operations are completed. If flags is MS_INVALIDATE, the function synchronizes the contents of the memory region to match the current file contents. o All writes to the mapped portion of the file made prior to the call are visible by subsequent read references to the mapped memory region. o All write references prior to the call, by any process, to memory regions mapped to the same portion of the file using MAP_SHARED, are visible by read references to the region. If msync() causes any write to the file, then the file's st_ctime and st_mtime fields are marked for update. RETURN VALUES
Upon successful completion, msync() returns 0; otherwise, it returns -1 and sets errno to indicate the error. ERRORS
The msync() function will fail if: EBUSY Some or all of the addresses in the range [addr, addr + len) are locked and MS_SYNC with the MS_INVALIDATE option is speci- fied. EAGAIN Some or all pages in the range [addr, addr + len) are locked for I/O. EINVAL The addr argument is not a multiple of the page size as returned by sysconf(3C). The flags argument is not some combination of MS_ASYNC and MS_INVALIDATE. EIO An I/O error occurred while reading from or writing to the file system. ENOMEM Addresses in the range [addr, addr + len) are outside the valid range for the address space of a process, or specify one or more pages that are not mapped. EPERM MS_INVALIDATE was specified and one or more of the pages is locked in memory. USAGE
The msync() function should be used by programs that require a memory object to be in a known state, for example in building transaction facilities. Normal system activity can cause pages to be written to disk. Therefore, there are no guarantees that msync() is the only control over when pages are or are not written to disk. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
memcntl(2), mmap(2), sysconf(3C), attributes(5), standards(5) SunOS 5.10 24 Jul 2002 msync(3C)
All times are GMT -4. The time now is 07:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy