05-23-2001
Thanks
Thanks for the speedy help
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
Discussion started by: Yinzer955i
2 Replies
2. Shell Programming and Scripting
Hi:
I have a requirement as below:
I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l).
When any user logs on and types... (2 Replies)
Discussion started by: ramesh_samane
2 Replies
3. Shell Programming and Scripting
I have a script in which i want to print absolute path of the same script irrespective of path from where i run script.
I am using
test.sh:
echo "pwd : `pwd`"
echo "script name: $0"
echo "dirname: `dirname $0`"
when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies
6. Shell Programming and Scripting
I want to pattern match only path part from below and replace them with new path string.
LoadModule jk_module /fldrA/fldrBaf/fldrCaa/modules/mod_jk.so
JkWorkersFile /fldrA/fldrBaf/fldrCaa/config/OHS/ohs1/workers.properties
JkLogFile... (4 Replies)
Discussion started by: kchinnam
4 Replies
7. Shell Programming and Scripting
Hi experts,
I have multiple file names ending with .jsp located in $SOME_DIR, $SOME_DIR/f1/,$SOME_DIR/f2/test,$SOME_DIR/f3/fa
and there are equivalent class files in $SOME_DIR/WEB-INF/classes/_pages,$SOME_DIR/WEB-INF/classes/_pages/_f1,... (0 Replies)
Discussion started by: oraclermanpt
0 Replies
8. UNIX for Advanced & Expert Users
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies
9. UNIX for Beginners Questions & Answers
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. Programming
i have make file which i try to make them generic
but it keeps to compline it missing include directory
this is the makefile :
CXX=g++
CPPFAGS= -Wall -O0 -g -std=c++14
INCLUDES = -I/home/vagrant/libuv/include -Isrc
LIBS_DIRS = -L/home/vagrant/libuv/build
LDFLAGS=... (7 Replies)
Discussion started by: umen
7 Replies
LEARN ABOUT POSIX
ddi_umem_unlock
ddi_umem_lock(9F) Kernel Functions for Drivers ddi_umem_lock(9F)
NAME
ddi_umem_lock, ddi_umem_unlock - lock and unlock memory pages
SYNOPSIS
#include <sys/ddi.h>
#include <sys/sunddi.h>
int ddi_umem_lock(caddr_t addr, size_t len, int flags, ddi_umem_cookie_t *cookiep);
void ddi_umem_unlock(ddi_umem_cookie_t cookie);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
PARAMETERS
ddi_umem_lock
addr
Virtual address of memory object
len
Length of memory object in bytes
flags
Valid flags include:
DDI_UMEMLOCK_READ
Memory pages are locked to be read from. (Disk write or a network send.)
DDI_UMEMLOCK_WRITE
Memory pages are locked to be written to. (Disk read or a network receive.)
cookiep
Pointer to a kernel memory cookie.
ddi_umem_unlock
cookie
Kernel memory cookie allocated by ddi_umem_lock().
DESCRIPTION
The ddi_umem_lock(9F) function locks down the physical pages (including I/O pages) that correspond to the current process' virtual address
range [addr, addr + size) and fills in a cookie representing the locked pages. This cookie can be used to create a buf(9S) structure that
can be used to perform I/O (see ddi_umem_iosetup(9F) and ddi_dma_buf_bind_handle(9F)), or it can be used with devmap_umem_setup(9F) to
export the memory to an application.
The virtual address and length specified must be at a page boundary and the mapping performed in terms of the system page size. See page-
size(1).
The flags argument indicates the intended use of the locked memory. Set flags to DDI_UMEMLOCK_READ if the memory pages will be read (for
example, in a disk write or a network send.) Set flags to DDI_UMEMLOCK_WRITE if the memory pages will be written (for example, in a disk
read or a network receive). You must choose one (and only one) of these values.
To unlock the locked pages, the drivers call ddi_umem_unlock(9F) with the cookie obtained from ddi_umem_lock(9F).
The process is not allowed to exec(2) or fork(2) while its physical pages are locked down by the device driver.
The device driver must ensure that the physical pages have been unlocked after the application has called close(2).
RETURN VALUES
On success, a 0 is returned. Otherwise, one of the following errno values is returned.
EFAULT
User process has no mapping at that address range or does not support locking
EACCES
User process does not have the required permission.
ENOMEM
The system does not have sufficient resources to lock memory.
EAGAIN
Could not allocate system resources required to lock the pages. The ddi_umem_lock() could succeed at a later time.
EINVAL
Requested memory is not aligned on a system page boundary.
CONTEXT
The ddi_umem_lock() function can only be called from user context; ddi_umem_unlock() from user, kernel, and interrupt contexts.
SEE ALSO
ddi_umem_iosetup(9F), ddi_dma_buf_bind_handle(9F), devmap_umem_setup(9F), ddi_umem_alloc(9F)
NOTES
The ddi_umem_lock(9F) function consumes physical memory. The driver is responsible for a speedy unlock to free up the resources.
ddi_umem_unlock() can defer unlocking of the pages to a later time depending on the implementation.
SunOS 5.10 4 Feb 2003 ddi_umem_lock(9F)