06-29-2010
Write it as what?
The open and write system calls seem relevant, and have extensive manual pages, beyond that you've told us little.
This User Gave Thanks to Corona688 For This Post:
6 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I have a sun blade 100 with solaris 10 and am perplexed by the instances of devices that I see when I attach a usb flash stick to one of the ports in the back of the chassis.
Here is what I see for USB storage in /etc/path_to_inst:
"/pci@1f,0/usb@c,3/storage@3" 0 "scsa2usb"... (0 Replies)
Discussion started by: montana77
0 Replies
2. Linux
does anybody have any experience with any of these composite video to usb devices on linux?
usb video capture - Google Product Search
would like to get one but a linux newbie and having trouble figuring out if any are ported...
i've found lots of things that link to freedesktop.org DisplayLink... (1 Reply)
Discussion started by: danpaluska
1 Replies
3. Shell Programming and Scripting
I need a way to reliably detect a USB storage device from a bash script. I know how to use 'lsusb' to list the USB devices - but then how can I match a device listed in 'lsusb' output to an actual disk device? Is there some way to map one to the other?
Any help appreciated. (3 Replies)
Discussion started by: dmaddox099
3 Replies
4. Shell Programming and Scripting
Dear experts,
I have an epoch time input file such as : -
1302451209564
1302483698948
1302485231072
1302490805383
1302519244700
1302492787481
1302505299145
1302506557022
1302532112140
1302501033105
1302511536485
1302512669550
I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies
5. Cybersecurity
Hello folks, for some confidential reason, I need to disable the USB to access the storage devices in Suse11.2, but I still need two USB for the mouse and keyboard. Anyone knows?
Thanks a lot in advance! (3 Replies)
Discussion started by: gnsxhj
3 Replies
6. AIX
Hi experts, recently i'm exploring USB with filesystem FAT32 mounting on my aix oslevel 6100-04-02-1007. I tried to google to get solutions but failed. Thus, i post it here hope to get solution. Appreciate :)
This is my usb drives: (5 Replies)
Discussion started by: polar
5 Replies
LEARN ABOUT FREEBSD
filemon
FILEMON(4) BSD Kernel Interfaces Manual FILEMON(4)
NAME
filemon -- the filemon device
SYNOPSIS
#include <dev/filemon/filemon.h>
DESCRIPTION
The filemon device allows a process to collect file operations data of its children. The device /dev/filemon responds to two ioctl(2) calls.
System calls are denoted using the following single letters:
'C' chdir(2)
'D' unlink(2)
'E' exec(2)
'F' fork(2), vfork(2)
'L' link(2), linkat(2), symlink(2), symlinkat(2)
'M' rename(2)
'R' open(2) for read
'S' stat(2)
'W' open(2) for write
'X' _exit(2)
Note that 'R' following 'W' records can represent a single open(2) for R/W, or two separate open(2) calls, one for 'R' and one for 'W'. Note
that only successful system calls are captured.
IOCTLS
User mode programs communicate with the filemon driver through a number of ioctls which are described below. Each takes a single argument.
FILEMON_SET_FD Write the internal tracing buffer to the supplied open file descriptor.
FILEMON_SET_PID Child process ID to trace.
RETURN VALUES
The ioctl() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate
the error.
FILES
/dev/filemon
EXAMPLES
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <dev/filemon/filemon.h>
#include <fcntl.h>
#include <err.h>
#include <unistd.h>
static void
open_filemon(void)
{
pid_t child;
int fm_fd, fm_log;
if ((fm_fd = open("/dev/filemon", O_RDWR | O_CLOEXEC)) == -1)
err(1, "open("/dev/filemon", O_RDWR)");
if ((fm_log = open("filemon.out",
O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, DEFFILEMODE)) == -1)
err(1, "open(filemon.out)");
if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) == -1)
err(1, "Cannot set filemon log file descriptor");
if ((child = fork()) == 0) {
child = getpid();
if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1)
err(1, "Cannot set filemon PID");
/* Do something here. */
} else {
wait(&child);
close(fm_fd);
}
}
Creates a file named filemon.out and configures the filemon device to write the filemon buffer contents to it.
SEE ALSO
dtrace(1), ktrace(1), script(1), truss(1), ioctl(2)
HISTORY
A filemon device appeared in FreeBSD 9.1.
BSD
June 14, 2013 BSD