10 More Discussions You Might Find Interesting
1. Red Hat
I would like to test open files usage in my system, if I want to create a process ( or script ) that can use a certain amount ( eg. 1000 ) of open files , is it possible to create such process ( or script ) ? (3 Replies)
Discussion started by: ust
3 Replies
2. Shell Programming and Scripting
A quick breakdown of my situation: I have 2 servers running OS 10.7, one in the US, the other in China. A folder is being synchronized via EMC's "Syncplicity".
Here is my problem- When we open an Excel spreadsheet on one server, Syncplicity does not sync over the temporary file that Excel... (0 Replies)
Discussion started by: sudo
0 Replies
3. Shell Programming and Scripting
Hello,
I have two files A and B. File A had a million records with each record been 10-digit number. File B had 400,000 records with each record been 10-digit number. There are some common and different records. I need to print out records in A that are not in B.
Please assist. Thanks - jak (5 Replies)
Discussion started by: jakSun8
5 Replies
4. Shell Programming and Scripting
I want to open a file and edit it using vi However, i dont want to open directories or binary files. how can i do this?
Right now it opens all files without caring
echo "please enter a file to edit in Vi"
read file
if
then (2 Replies)
Discussion started by: icelated
2 Replies
5. Homework & Coursework Questions
1.) I am to write scripts that will be phasetest folder in the home directory.
2.) The folder should have a set-up,phase and display files
I have written a small script which i used to check for the existing users and their password.
What I need help with:
I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies
6. Solaris
Hey All,
I had some minor questions regarding Sun's open storage
I understand it uses standard industry hardware (is the warranty void if we were to mix and match drives?)
I know it uses OpenSolaris for the storage features (but can it use any os?)
Does it have to be OpenSource? I... (7 Replies)
Discussion started by: Keepcase
7 Replies
7. UNIX for Dummies Questions & Answers
Hi--
I'm trying to figure out how to use cat more wisely. I have the following command, which works, but I'd like to understand how to get it to work more clearly and efficiently.
cat 'my file.001' 'my file.002' 'my file.003' 'my file.004' 'my file.005' 'my file.006' 'my file.007' 'my... (6 Replies)
Discussion started by: rlinsurf
6 Replies
8. Solaris
Hi,
I am newbie to Solaris and system administration in general, and I have a couple of questions about files in my HOME directory.
When I perform ls -la, I get the following list of files:
drwxr-xr-x 7 XXXYYY staff 17 Aug 24 07:31 .
drwxr-xr-x 7 root root 7... (2 Replies)
Discussion started by: JVerstry
2 Replies
9. UNIX for Advanced & Expert Users
Hi ,
We are using a Tool which runs on Unix Server. Have a Event which have some join operation and tries to open files depending on the join operation. So get the error
config/variants/orcl6/partitions/ml6/data/ap_PCardMap.csv (Too many open files)
Can someone please... (3 Replies)
Discussion started by: shashank_recj
3 Replies
10. Solaris
I'm getting an error "too many files open"
# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
nofiles(descriptors) 256
memory(kbytes) unlimited
#
hard limit shows 1024
I would like to know how many files... (1 Reply)
Discussion started by: max_min
1 Replies
fopen(3UCB) SunOS/BSD Compatibility Library Functions fopen(3UCB)
NAME
fopen, freopen - open a stream
SYNOPSIS
/usr/ucb/cc [ flag ... ] file ...
#include <stdio.h>
FILE *fopen(file, mode)
const char *file, *mode;
FILE *freopen(file, mode, iop)
const char *file, *mode;
register FILE *iop;
DESCRIPTION
The fopen() function opens the file specified by file and associates a stream with it. If the open succeeds, fopen() returns a pointer to
be used to identify the stream in subsequent operations. The file argument points to a character string that contains the name of the file
to be opened. The mode argument is a character string having one of the following values:
r open for reading
w truncate or create for writing
a append: open for writing at end of file, or create for writing
r+ open for update (reading and writing)
w+ truncate or create for update
a+ append; open or create for update at EOF
The freopen() function opens the file specified by file and associates the stream pointed to by iop with it. The mode argument is used just
as in fopen(). The original stream is closed, regardless of whether the open ultimately succeeds. If the open succeeds, freopen() returns
the original value of iop.
The freopen() function is typically used to attach the preopened streams associated withstdin, stdout, and stderr to other files.
When a file is opened for update, both input and output can be performed on the resulting stream. Output cannot be directly followed by
input without an intervening fseek(3C) or rewind(3C). Input cannot be directly followed by output without an intervening fseek(3C) or
rewind(3C). An input operation that encounters EOF will fail.
RETURN VALUES
The fopen() and freopen() functions return a NULL pointer on failure.
USAGE
The fopen() and freopen() functions have transitional interfaces for 64-bit file offsets. See lf64(5).
SEE ALSO
cc(1B), open(2), fclose(3C), fopen(3C), freopen(3C), fseek(3C), malloc(3C), rewind(3C), lf64(5)
NOTES
Use of these functions should be restricted to applications written on BSD platforms. Use of these functions with any of the system
libraries or in multithreaded applications is unsupported.
To support the same number of open files as the system, fopen() must allocate additional memory for data structures using malloc(3C) after
64 files have been opened. This confuses some programs that use their own memory allocators.
The fopen() and freopen() functions differ from the standard I/O functions fopen(3C) and freopen(3C). The standard I/O functions distin-
guish binary from text files with an additional use of 'b' as part of the mode, enabling portability of fopen(3C) and freopen(3C) beyond
SunOS 4.x systems.
SunOS 5.11 30 Oct 2007 fopen(3UCB)