I have a script which loop through a directory then report any file matches the given pattern,
say, the pattern is "a2006", this file would be returned
a20061101.txt
I would like to know how can I get the remaining of the filename, so
a20061101txt - a2006 = 1101.txt
Can anybody help? Thank... (2 Replies)
Hi All,
I have a set of data and i want to arrange it in a neater way.
Is there any ways i can align each term to the left such that every field start on the same vertical point
Actual Data
111111 bbb dddd zz
111111 bbbbbb dddd zz
111111 bbbbbbbbb dddd zz
111111 aa dddd zzz (2 Replies)
hi
i have a file which is like this :
aab ghj
ghj lsklk
lklkl;
ashjd
kjs
alskj
How do i remove the spaces from the beginning of a line so that all lines are indented to the left? (1 Reply)
Hi
A question about numeric display there...
Is there any option in awk that would prints a number with "left filled with zero" format, and how does it work with variable length definition?
For instance IŽd like my variable to be left filled with 0s for a length of 3 in total:
4 would be... (3 Replies)
I am new to bash scripts I need something quite easy to do in VBS,
When I wanted to get the first 5 chars I used funcition right(5,strGet)
how can I do the same in bash?
I am trying to get the MAC address in Ubuntu I have done so far
ifconfig wlan2 | grep HWaddr | awk '{print $5}' | sed -e... (3 Replies)
We are using this function tmpfile() :
FILE *tmpfp ;
if ((tmpfp = tmpfile()) == NULL)
{
fprintf(stderr, "%s: ERROR: init_operator(): ", ROUTINE);
perror("tmpfile()");
exit(ERR_OPEN);
}
and the above is raising error :
MSMD0603: ERROR:... (3 Replies)
hello all,
i have a proc binary that we run on unix environment, and it is generating this error
'' tstfile(): No space left on device ''
can you please assist on how to narrow down the problem?
thanks (4 Replies)
Here we go with a dumb question.
I am admin for a couple of old aix 5.2 and 5.3 machines and I am wondering if there is a way for me (without driving 500miles) to find out if there is room for additional hard drives in my machine.
Google is once again *sight* helpless... (5 Replies)
Hello people
I have a small fileserver running busybox (very small linux distro with most essential stuff on it) and I am trying to remove some unused directories on it.
When I try this:
rm -R test/I get:
rm: cannot remove 'test': No space left on devicedf shows:
Filesystem ... (8 Replies)
Discussion started by: GTCG
8 Replies
LEARN ABOUT SUNOS
ddi_dma_sync
ddi_dma_sync(9F) Kernel Functions for Drivers ddi_dma_sync(9F)NAME
ddi_dma_sync - synchronize CPU and I/O views of memory
SYNOPSIS
#include <sys/ddi.h>
#include <sys/sunddi.h>
int ddi_dma_sync(ddi_dma_handle_t handle, off_t offset, size_t length, uint_t type);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
handle The handle filled in by a call to ddi_dma_alloc_handle(9F).
offset The offset into the object described by the handle.
length The length, in bytes, of the area to synchronize. When length is zero, the entire range starting from offset to the end of
the object has the requested operation applied to it.
type Indicates the caller's desire about what view of the memory object to synchronize. The possible values are
DDI_DMA_SYNC_FORDEV, DDI_DMA_SYNC_FORCPU and DDI_DMA_SYNC_FORKERNEL.
DESCRIPTION
ddi_dma_sync() is used to selectively synchronize either a DMA device's or a CPU's view of a memory object that has DMA resources allocated
for I/O . This may involve operations such as flushes of CPU or I/O caches, as well as other more complex operations such as stalling until
hardware write buffers have drained.
This function need only be called under certain circumstances. When resources are allocated for DMA using ddi_dma_addr_bind_handle() or
ddi_dma_buf_bind_handle(), an implicit ddi_dma_sync() is done. When DMA resources are deallocated using ddi_dma_unbind_handle(9F), an
implicit ddi_dma_sync() is done. However, at any time between DMA resource allocation and deallocation, if the memory object has been mod-
ified by either the DMA device or a CPU and you wish to ensure that the change is noticed by the party that did not do the modifying, a
call to ddi_dma_sync() is required. This is true independent of any attributes of the memory object including, but not limited to, whether
or not the memory was allocated for consistent mode I/O (see ddi_dma_mem_alloc(9F)) or whether or not DMA resources have been allocated
for consistent mode I/O (see ddi_dma_addr_bind_handle(9F) or ddi_dma_buf_bind_handle(9F)).
If a consistent view of the memory object must be ensured between the time DMA resources are allocated for the object and the time they
are deallocated, you must call ddi_dma_sync() to ensure that either a CPU or a DMA device has such a consistent view.
What to set type to depends on the view you are trying to ensure consistency for. If the memory object is modified by a CPU, and the object
is going to be read by the DMA engine of the device, use DDI_DMA_SYNC_FORDEV. This ensures that the device's DMA engine sees any changes
that a CPU has made to the memory object. If the DMA engine for the device has written to the memory object, and you are going to read
(with a CPU) the object (using an extant virtual address mapping that you have to the memory object), use DDI_DMA_SYNC_FORCPU. This ensures
that a CPU's view of the memory object includes any changes made to the object by the device's DMA engine. If you are only interested in
the kernel's view (kernel-space part of the CPU's view) you may use DDI_DMA_SYNC_FORKERNEL. This gives a hint to the system--that is, if it
is more economical to synchronize the kernel's view only, then do so; otherwise, synchronize for CPU.
RETURN VALUES
ddi_dma_sync() returns:
DDI_SUCCESS Caches are successfully flushed.
DDI_FAILURE The address range to be flushed is out of the address range established by ddi_dma_addr_bind_handle(9F) or
ddi_dma_buf_bind_handle(9F).
CONTEXT
ddi_dma_sync() can be called from user or interrupt context.
SEE ALSO ddi_dma_addr_bind_handle(9F), ddi_dma_alloc_handle(9F), ddi_dma_buf_bind_handle(9F), ddi_dma_mem_alloc(9F), ddi_dma_unbind_handle(9F)
Writing Device Drivers
SunOS 5.10 8 Nov 2003 ddi_dma_sync(9F)