Sponsored Content
Top Forums Programming help with opening files and reading them in C Post 302495515 by omega666 on Thursday 10th of February 2011 12:51:19 PM
Old 02-10-2011
when doing the access command i am getting this error


:108: error: âR_OKâ undeclared (first use in this function)
108: error: (Each undeclared identifier is reported only once
108: error: for each function it appears in.)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Opening Files

I'm a new to UNIX/LINUX. I just put cygwin on my laptop and I can navigate around the directories, but I can't open files (.doc, .ppt, .html or .exe). Is there an explicit command to do this? I know that in Solaris when it does not recognize the file, it brings up the list of available viewing... (4 Replies)
Discussion started by: AJA
4 Replies

2. UNIX for Dummies Questions & Answers

Opening files

I am very new to unix. I want to open a file and read one line in at a time. Can anybody help? (3 Replies)
Discussion started by: saarshad001
3 Replies

3. UNIX for Dummies Questions & Answers

opening non-html files in lynx??

when i try to open a txt file in lynx I need to provide the filename or use wildcards to open. Autocompletion doesn't work for some reason. Also, trying to open files like: .sh, .py etc. ends up in the following error: lynx: Start file could not be found or is not text/html or text/plain ... (0 Replies)
Discussion started by: riwa
0 Replies

4. UNIX for Dummies Questions & Answers

Opening Files in append mode

Is there any other way to open a file in append mode without using C calls or >> redirection? (1 Reply)
Discussion started by: vidhya
1 Replies

5. Shell Programming and Scripting

Opening Files as command line arguments

Hi have set a command line argument where the user enters the filename. I have set a condition that if the command line is null (user just enters return), the script will exit (with an error message). However, what if the user types something and the file isn't found. How will I go about... (20 Replies)
Discussion started by: Cactus Jack
20 Replies

6. Shell Programming and Scripting

error while opening files in a directory

I tried opening the files in a directory and print thier names. But it was thowing the error "unable to open directorty at t5.pl line 2." Can u plz correct this error in below mentioned code. #!/data/scoredev/perl opendir(HOMEDIR,"c:\vin") || die("unable to open directorty");... (3 Replies)
Discussion started by: vinay123
3 Replies

7. Web Development

opening text files with javascript

Im aware under IE, javascript uses ActiveX Objects to open up and manipulate text files, excel files etc.. How abouts would I open a text file using javascript in Firefox ? thanks (1 Reply)
Discussion started by: JamesGoh
1 Replies

8. Shell Programming and Scripting

Opening Mulitple files using For loop in Perl

Hi All, I have a total of ten file to open in the Perl script and i am using a for loop to open each file and capture some strings inside each file. Unfortunately, i encounter the below syntax error. I think there should be something wrong with this term reports_${counting}_${_}.txt but i do... (4 Replies)
Discussion started by: Raynon
4 Replies

9. Shell Programming and Scripting

Perl-opening a file then copying files

Good morning guys!! Im still practicing with Perl and now Im trying to open a file, and copy its contents to another file. Them I want to remeove the information out of the orginal file after it is copied over. The flow should be messages-->messages1-->messages2. Kind of like a log... (1 Reply)
Discussion started by: bigben1220
1 Replies

10. Shell Programming and Scripting

Loop Script and not opening files containing spaces

Hello, I wrote a simple script, that basically wait for a *.dat-file in a certain folder, which is always a zipped file and extracts it. It worked before and i changed nothing in the script, but since last week i have the problem, that it doesnt extract files containing a space. How do i make... (4 Replies)
Discussion started by: blend_in
4 Replies
PTS_CREATEUSER(1)					       AFS Command Reference						 PTS_CREATEUSER(1)

NAME
pts_createuser - Creates a user or machine entry in the Protection Database SYNOPSIS
pts createuser -name <user name>+ [-id <user id>+] [-cell <cell name>] [-noauth] [-localauth] [-force] [-help] pts createu -na <user name>+ [-i <user id>+] [-c <cell name>] [-no] [-l] [-f] [-h] pts cu -na <user name>+ [-i <user id>+] [-c <cell name>] [-no] [-l] [-f] [-h] DESCRIPTION
The pts createuser command creates an entry in the Protection Database for each user or machine specified by the -name argument. A user entry name becomes the user's AFS username (the one to provide when authenticating with the AFS Authentication Server). A machine entry's name is the machine's IP address or a wildcard notation that represents a range of consecutive IP addresses (a group of machines on the same network). It is not possible to authenticate as a machine, but a group to which a machine entry belongs can appear on a directory's access control list (ACL), thereby granting the indicated permissions to any user logged on to the machine. AFS user IDs (AFS UIDs) are positive integers and by default the Protection Server assigns an AFS UID that is one greater than the current value of the "max user id" counter in the Protection Database, incrementing the counter by one for each user. To assign a specific AFS UID, use the -id argument. If any of the specified AFS UIDs is greater than the current value of the "max user id" counter, the counter is reset to that value. It is acceptable to specify an AFS UID smaller than the current value of the counter, but the creation operation fails if an existing user or machine entry already has it. To display or set the value of the "max user id" counter, use the pts listmax or pts setmax command, respectively. The issuer of the pts createuser command is recorded as the entry's creator and the group system:administrators as its owner. CAUTIONS
The Protection Server reserves AFS UID 0 (zero) and returns an error if the -id argument has that value. OPTIONS
-name <user name>+ Specifies either a username for a user entry, or an IP address (complete or wildcarded) for a machine entry: o A username can include up to 63 numbers and lowercase letters, but it is best to make it shorter than eight characters, because many application programs cannot handle longer names. Also, it is best not to include shell metacharacters or other punctuation marks. In particular, the colon (":") and at-sign ("@") characters are not acceptable. The period is generally used only in special administrative names, to separate the username and an instance, as in the example "pat.admin". o A machine identifier is its IP address in dotted decimal notation (for example, 192.12.108.240), or a wildcard notation that represents a set of IP addresses (a group of machines on the same network). The following are acceptable wildcard formats. The letters "W", "X", "Y" and "Z" each represent an actual number from the range 1 through 255. o W.X.Y.Z represents a single machine, for example 192.12.108.240. o W.X.Y.0 matches all machines whose IP addresses start with the first three numbers. For example, 192.12.108.0 matches both 192.12.108.119 and 192.12.108.120, but does not match 192.12.105.144. o W.X.0.0 matches all machines whose IP addresses start with the first two numbers. For example, the address 192.12.0.0 matches both 192.12.106.23 and 192.12.108.120, but does not match 192.5.30.95. o W.0.0.0 matches all machines whose IP addresses start with the first number in the specified address. For example, the address 192.0.0.0 matches both 192.5.30.95 and 192.12.108.120, but does not match 138.255.63.52. Do not define a machine entry with the name 0.0.0.0 to match every machine. The system:anyuser group is equivalent. -id <user id>+ Specifies an AFS UID for each user or machine entry, rather than allowing the Protection Server to assign it. Provide a positive integer. If this argument is used and the -name argument names multiple new entries, it is best to provide an equivalent number of AFS UIDs. The first UID is assigned to the first entry, the second to the second entry, and so on. If there are fewer UIDs than entries, the Protection Server assigns UIDs to the unmatched entries based on the "max user id" counter. If there are more UIDs than entries, the excess UIDs are ignored. If any of the UIDs is greater than the current value of the "max user id" counter, the counter is reset to that value. -cell <cell name> Names the cell in which to run the command. For more details, see pts(1). -force Enables the command to continue executing as far as possible when errors or other problems occur, rather than halting execution at the first error. -help Prints the online help for this command. All other valid options are ignored. -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. Do not combine this flag with the -cell or -noauth options. For more details, see pts(1). -noauth Assigns the unprivileged identity anonymous to the issuer. For more details, see pts(1). OUTPUT
The command generates the following string to confirm creation of each user: User <name> has id <id> EXAMPLES
The following example creates a Protection Database entry for the user "johnson". % pts createuser -name johnson The following example creates three wildcarded machine entries in the ABC Corporation cell. The three entries encompass all of the machines on the company's networks without including machines on other networks: % pts createuser -name 138.255.0.0 192.12.105.0 192.12.106.0 PRIVILEGE REQUIRED
The issuer must belong to the system:administrators group. SEE ALSO
pts(1), pts_listmax(1), pts_setmax(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2014-04-08 PTS_CREATEUSER(1)
All times are GMT -4. The time now is 04:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy