I am trying to find a way to check the current status of a file. Such as some cron job processes are dependent on the completion of others. if a file is currently being accessed / modified or simply open state I will wait until it is done being processed before attempting the next process on that... (3 Replies)
I am out of idea what to do to resolve the problem!
I need to use the open(file, for.., access) function to write a file.
Never have the situation like that: it is return 0 - zero.
As a result all write(..) going to the screen!
What the problem it could be?
I do not even know... (2 Replies)
First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting.
First, this is what's running:
This is the error when jobs are run or the... (0 Replies)
We are trying to install third party software on this unix server...
Here is the error message we are getting...
error while loading shared libraries: libodbc.so.1: cannot open shared object file: No such file or directory
It seems like odbc driver is not installed...
>rpm -q unixODBC... (1 Reply)
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
Hi,
I am running this command through a shell script and getting the error mentioned in the subject line:
testing.awk -f x.txt TNAME
My testing.awk file contains something like
++++++++++++++++++
#!/usr/bin/awk -f
BEGIN{
TAB_NAME="INSERT_ONE_" ARGV ;
}
if ( $1=="JAM_ONE" &&... (1 Reply)
Hey all,
I'm brand new to script writing, I'm wanting to make a script that will ask for a file and then retrieve that file if it exists, and if it doesn't exist, create the file with the desired name, and I'm completely stuck.. so far..
#! bin/bash
echo "Enter desired file"
read "$file"
if ... (5 Replies)
Discussion started by: Byrang
5 Replies
LEARN ABOUT PLAN9
srv
SRV(3) Library Functions Manual SRV(3)NAME
srv - server registry
SYNOPSIS
bind #s /srv
#s/service1
#s/service2
...
DESCRIPTION
The srv device provides a one-level directory holding already-open channels to services. In effect, srv is a bulletin board on which pro-
cesses may post open file descriptors to make them available to other processes.
To install a channel, create a new file such as /srv/myserv and then write a text string (suitable for strtoul; see atof(2)) giving the
file descriptor number of an open file. Any process may then open /srv/myserv to acquire another reference to the open file that was reg-
istered.
An entry in srv holds a reference to the associated file even if no process has the file open. Removing the file from /srv releases that
reference.
It is an error to write more than one number into a server file, or to create a file with a name that is already being used.
EXAMPLE
To drop one end of a pipe into /srv, that is, to create a named pipe:
int fd, p[2];
char buf[32];
pipe(p);
fd = create("/srv/namedpipe", 1, 0666);
sprint(buf, "%d", p[0]);
write(fd, buf, strlen(buf));
close(fd);
close(p[0]);
write(p[1], "hello", 5);
At this point, any process may open and read /srv/namedpipe to receive the hello string. Data written to /srv/namedpipe will be received
by executing
read(p[1], buf, sizeof buf);
in the above process.
SOURCE
/sys/src/9/port/devsrv.c
SRV(3)