What EXACTLY does the following command display(please cut and paste the output):
This will read the ls -l output. Look for ^I $ or other weird characters.
cat -vet asks cat to display unprintable characters and display the end of the line character with a $. I think you may have garbage in the filename. After you show us what you really have then we can help you rename the file or get rid of it.
I am writing a script that periodically reads in data from a text file. The only issue is that, that text file is periodically updated (appended to) by another script. I am using perl in UNIX environment. How can I check if that text file is being accessed, so I can wait until it is no longer being... (6 Replies)
Hi,
I need to count the number of times a script is accessed from within the script. Is it possible ?
Example: I have a script called lo.sh and i execute the script for the first time, then the counter variable declared inside the lo.sh should increment by 1. For every execution the... (1 Reply)
when unix is logged in it access some login file depending on the shell
like .cshrc , .login , .vimrc , .bashrc
how can we know which is being access in a perticular unix flavor. (1 Reply)
Hey,
I want to ask a simple Question....
How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (1 Reply)
Hey,
I want to ask a simple Question....
How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (16 Replies)
Hello, is there maybe a way to check if a specific file is being accessed at the moment?
Example:
You will start copying a 10 GB file from A to B, how could I code it so my script actually knows when file B is finished copying? (1 Reply)
Hi All,,
I need to find the latest files that are accessed less than 10mins in a particular directory & send those files in an attachment.
I could use the below simple one. But if the directory was not updated any recently i could mail the old file again, i need to eliminate that.. What shld... (8 Replies)
Discussion started by: Jeevitha
8 Replies
LEARN ABOUT HPUX
sem_open
sem_open(2) System Calls Manual sem_open(2)NAME
sem_open - create/open a named POSIX semaphore
SYNOPSIS DESCRIPTION
is used to open or create a named semaphore. A successful call to will create a descriptor for the semaphore specified by name. The
pointer to the semaphore returned by can be used to access the semaphore associated with name in subsequent operations. The name argument
points to a string referring to a semaphore. It should begin with a "/" and shall conform to pathname rules except that no path component
should be "." or "..".
The oflag argument specifies whether a semaphore is to be created or not. The following bits in it may be set:
If this flag is set, a new semaphore is created if it does not already exist.
If this flag is not set, the semaphore should already exist.
If this flag is set, the call fails if the semaphore already exists.
This flag is valid only when is also set; otherwise, it is ignored.
The mode and value arguments are provided to supply the permissions and the initial value information necessary for creating a new sema-
phore.
To use this function, link in the realtime library by specifying on the compiler or linker command line.
EXAMPLES
The following call to will create a new named semaphore if one does not exist, which depends on the flags specified in oflag, has the per-
missions specified in mode and has an initial value of value.
RETURN VALUE
If the semaphore was created and initialized, returns a pointer to a structure containing the index of the new descriptor.
If the semaphore could not be created/initialized, the call returns -1 and sets to indicate the error. If the named semaphore is already
opened by the calling process, a descriptor and a structure for the named semaphore already exists for the calling process. A new descrip-
tor is not created and a pointer to the existing structure is returned for this call.
ERRORS
fails and does not perform the requested operation if any of the following conditions are encountered:
[EACCES] The named semaphore exists and the process does not have the permissions to open the semaphore as described by oflag,
or the named semaphore does not exist and the process does not have the permission to open it.
[EEXIST] The flags and are set in oflag and the named semaphore exists.
[EINTR] A signal interrupted the operation.
[EINVAL] The argument value is greater than and the flag was specified in oflag.
[EINVAL] The name argument does not begin with "/" or contains "." or ".." as a pathname component.
[EMFILE] Too many semaphore descriptors are currently in use by this process.
[ENAMETOOLONG] The name string is longer than
[ENFILE] There are too many semaphores in the system.
[ENOENT] The flag is not set in oflag and the named semaphore does not exist.
[ENOSPC] There are insufficient resources for the creation of a new named semaphore.
SEE ALSO sem_close(2), sem_post(2), sem_wait(2), sem_unlink(2), privileges(5), <semaphore.h>.
STANDARDS CONFORMANCE sem_open(2)