Sponsored Content
Top Forums UNIX for Dummies Questions & Answers File shows in ls but cannot be accessed Post 302894521 by jim mcnamara on Tuesday 25th of March 2014 11:44:03 PM
Old 03-26-2014
What EXACTLY does the following command display(please cut and paste the output):
Code:
ls -l CD*|  cat -vet

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.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to check if a unix text file is being accessed?

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)
Discussion started by: rickylui
6 Replies

2. Shell Programming and Scripting

Counting Number of times a File is accessed

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)
Discussion started by: pathanjalireddy
1 Replies

3. UNIX for Dummies Questions & Answers

list file which is accessed yesterday

how can I use 'ls' to list file which is accessed yesterday? Thx :confused: (2 Replies)
Discussion started by: aaron_fong
2 Replies

4. Shell Programming and Scripting

how to know which login file is being accessed

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)
Discussion started by: useless79
1 Replies

5. Shell Programming and Scripting

Can we get the list of users who accessed a file

Hi all, I will thankful if anybody helps me in finding out the users who accessed any of our files. Thanks in advance Chanakya (2 Replies)
Discussion started by: Chanakya.m
2 Replies

6. AIX

File Accessed Alarm ??

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)
Discussion started by: varungupta
1 Replies

7. Shell Programming and Scripting

File Accessed Alarm ??

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)
Discussion started by: varungupta
16 Replies

8. Shell Programming and Scripting

check if file is being accessed by any application

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)
Discussion started by: TehOne
1 Replies

9. UNIX for Advanced & Expert Users

How to find out last 5 users who have accessed a file?

Hi All, is there any command or script to find out last five users who have accessed a file thanks jcpratap (1 Reply)
Discussion started by: Jcpratap
1 Replies

10. UNIX for Beginners Questions & Answers

Find file that are accessed less than 10 minutes in a directory

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
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)
All times are GMT -4. The time now is 09:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy