i'm trying to move a file from one diectory to another and rename it at the same time. but its giving me an error .
" mv: cannot unlink /dir2/file5 : No such file or directory"
here is the command I'm using.
mv /dir1/file1 /dir2/file5
solaris 8 (1 Reply)
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold
I use top on other... (5 Replies)
Hi ,
Please help with the following questions
1) how can i find size of a file ? i have written du -k $flname > s1 . Is this right ?
Any other better suggeastions ?
2) how do I use mv command for moving the file ? I need the syntax with some examples
3) Command for printing the total... (1 Reply)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi Folks
I need a one liner to parse through a log and if the string is found print the line above, the line with the string and the line below.
example:
The ball is green and blue
Billy through the ball higer.
Jane got hurt with the ball.
So if I search for Billy I would need the 3... (1 Reply)
I have a log file that I want to archive out as it reaches 100MB. I am using the following to get the file size into a variable but get the error "line 5:
filesize=$(wc -c < logfile.log)
if
then
echo "is greater than 100M"
else
echo "is less than 100M"
fi
I'm sure there's something... (2 Replies)
Need help on moving .csv file from unix to windows file path. (1 Reply)
Discussion started by: lakshmanraok117
1 Replies
LEARN ABOUT OPENSOLARIS
usb_get_string_descr
usb_get_string_descr(9F) Kernel Functions for Drivers usb_get_string_descr(9F)NAME
usb_get_string_descr - Get string descriptor from device
SYNOPSIS
#include <sys/usb/usba.h>
int usb_get_string_descr(dev_info_t *dip,
uint16_t langid, uint8_t index,
char *buf, size_t buflen);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
PARAMETERS
dip Pointer to the device's dev_info structure.
langid Language ID. Currently only USB_LANG_ID (English ascii) is valid.
index String index indicating descriptor to retrieve.
buf Address into which the string descriptor is placed.
buflen Size of buf in bytes.
DESCRIPTION
The usb_get_string_descr() function retrieves a parsed string descriptor from a device. dip specifies the device, while index indicates
which descriptor to return.
String descriptors provide information about other descriptors, or information that is encoded in other descriptors, in readable form. Many
descriptor types have one or more index fields which identify string descriptors. (See Sections 9.5 and 9.6 of the USB 2.0 specifica-
tion.) For example, a configuration descriptor's seventh byte contains the string descriptor index describing a specific configuration.
Retrieved descriptors that do not fit into buflen bytes are truncated. All returned descriptors are null-terminated.
RETURN VALUES
USB_SUCCESS String descriptor is returned in buf.
USB_INVALID_ARGS dip or buf are NULL, or index or buflen is 0.
USB_FAILURE Descriptor cannot be retrieved.
CONTEXT
May be called from user or kernel context.
EXAMPLES
/* Get the first string descriptor. */
char buf[SIZE];
if (usb_get_string_descr(
dip, USB_LANG_ID, 0, buf, SIZE) == USB_SUCCESS) {
cmn_err (CE_NOTE, "%s%d: %s",
ddi_driver_name(dip), ddi_get_instance(dip), buf);
}
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |PCI-based systems |
+-----------------------------+-----------------------------+
|Interface stability |Committed |
+-----------------------------+-----------------------------+
|Availability |SUNWusb |
+-----------------------------+-----------------------------+
SEE ALSO attributes(5), usb_get_dev_data(9F), usb_string_descr(9S)SunOS 5.11 5 Jan 2004 usb_get_string_descr(9F)