OPEN(2) System Calls Manual OPEN(2)NAME
open - open for reading or writing
SYNOPSIS
open(name, mode)
char *name;
DESCRIPTION
Open opens the file name for reading (if mode is 0), writing (if mode is 1) or for both reading and writing (if mode is 2). Name is the
address of a string of ASCII characters representing a path name, terminated by a null character.
The file is positioned at the beginning (byte 0). The returned file descriptor must be used for subsequent calls for other input-output
functions on the file.
SEE ALSO creat(2), read(2), write(2), dup(2), close(2)DIAGNOSTICS
The value -1 is returned if the file does not exist, if one of the necessary directories does not exist or is unreadable, if the file is
not readable (resp. writable), or if too many files are open.
ASSEMBLER
(open = 5.)
sys open; name; mode
(file descriptor in r0)
OPEN(2)
Check Out this Related Man Page
CREAT(2) System Calls Manual CREAT(2)NAME
creat - create a new file
SYNOPSIS
creat(name, mode)
char *name;
DESCRIPTION
Creat creates a new file or prepares to rewrite an existing file called name, given as the address of a null-terminated string. If the
file did not exist, it is given mode mode, as modified by the process's mode mask (see umask(2)). Also see chmod(2) for the construction
of the mode argument.
If the file did exist, its mode and owner remain unchanged but it is truncated to 0 length.
The file is also opened for writing, and its file descriptor is returned.
The mode given is arbitrary; it need not allow writing. This feature is used by programs which deal with temporary files of fixed names.
The creation is done with a mode that forbids writing. Then if a second instance of the program attempts a creat, an error is returned and
the program knows that the name is unusable for the moment.
SEE ALSO write(2), close(2), chmod(2), umask (2)
DIAGNOSTICS
The value -1 is returned if: a needed directory is not searchable; the file does not exist and the directory in which it is to be created
is not writable; the file does exist and is unwritable; the file is a directory; there are already too many files open.
ASSEMBLER
(creat = 8.)
sys creat; name; mode
(file descriptor in r0)
CREAT(2)
Help! SSH is returning the following error message:
OpenSSL version mismatch. Built against 90581f, you have 90602f
How can I correct this? (21 Replies)
I don't want SunOS 5.8 to appear when someone logs into my machine... how do I go about changing the banner?
I was thumbing through my unix books and I haven't found anything... I'm probably looking under the wrong topic...
anyways... any help would be greatly appreciated. (20 Replies)
Hello all expert network administrator, i truly new to networking. Please help me in this problem. /etc/hostname.rl1(Wired Internal interface) inet 10.0.0.1 255.255.255.0 none
/etc/hostname.ral0 : inet 10.0.1.1 255.255.255.0 and others option as well.
/etc/dhcpd.conf : share-network local {... (82 Replies)
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)
My dear friends is Sun microsystems normall corporation I can not set Croatian keyboard no CHANCE i tried every possible method and today I can not get my GUI login.
But strange thing is that on openSolaris my keyboard layout work PERFECTLY like in linux but I do no want to go to OpenSolaris... (36 Replies)
I have a C++ program which includes lots of libraries, including openssl libcrypto. In fact, the g++ switches are:
-lxml2 -lcrypto -lcurl etc.
The problem is that when I try to run it on a different flavor of Linux, it complains that it cannot load libcrypto.so.8. I did some research and... (20 Replies)
I am seeking help on one script that I created to celan up database audit files. The error returned is
$./clean_audit.sh: /opt/oracle/logs/audit_clean.log: cannot open The same script is working on other 2 or 3 servers. But not working on other 4 servers. All servers are Oracle Linux. Here is... (21 Replies)
i want to kill a tcp connection by killing its pid
with netstat -an i got the tcp ip connection on port 5914
but when i type ps -a or ps-e there is not such process running on port 5914
is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Hello,
I have a sun v880 that i got from ebay for cheap as a way to to learn Solaris and sun hardware in general.
The machine currently has OBP 4.7.0 2002/10/25 and i was wondering if there was a way to update the prom with out and active solaris install, as currently when i proceed with the... (29 Replies)
Hi everyone,
I know the following questions are noobish questions but I am asking them because I am confused about the basics of history behind UNIX and LINUX.
Ok onto business, my questions are-:
Was/Is UNIX ever an open source operating system ?
If UNIX was... (21 Replies)
Dear friends,
i am having some Problems with a Sco Openserver in a Box (normally on VMWare, importing it on a Virtualbox does the same).
When i boot up the system on xx/09/2015 i got fork failed - too many processes during startup.
The programs which should run on the server, do not run.
I... (67 Replies)
Is there a way to append an existing xlsx worksheet to add data from a text file ?
I have an excel file for which I need to manipulate the first worksheet based on a text file.
I match the text file to the xlsx and write the 'Scores' column in the xlsx sheet and save the workbook.
For those ... (43 Replies)
Hi there! I'm developing a program that allows the user to open and edit files using both an editor and the terminal. Once the user has finished editing the file an update is sent to the logbook that compares the file before and after it was edited - this can only be done if the file is closed (I... (23 Replies)
We have a legacy system that runs on SCO OpenServer 5.0.6, and I've rebuilt the server a couple of times so we can have access to old historical data. That system suddenly went offline for no known reason, and I know that the configuration has not been altered, there is nobody with access to the... (63 Replies)