04-12-2011
Thanks a lot.
that's exactly what I was looking for.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have read this thread : http://forums.unix.com/showthread.php?threadid=75
Which was very informative, but I still have a question or two.
I am getting ready to put a box together and put UNIX on it so when I buy the first two books listed I can start practicing. That said, what version of... (2 Replies)
Discussion started by: ICE
2 Replies
2. Solaris
quick question about PAM module. Here may pam.conf file. How do I verify that pam modules work correctly? Does it mean when it run cron job, it checks the pam module for authentication? Thanks in advance.
#
passwd auth required pam_passwd_auth.so.1
#
# cron service (explicit... (0 Replies)
Discussion started by: mokkan
0 Replies
3. UNIX for Dummies Questions & Answers
Hello, Max here, I have installed FreeBSD on a compaq Intel box an have filesystem problems. I am now on install number 3 and encounter the same error. This time after DL the ports list and DL a number of programs the DL stopped and I got an error message that the filesystem is full I am looking... (6 Replies)
Discussion started by: madMax8911
6 Replies
4. Linux
i'm having trouble putting together a program :( any help would be much appreciated!
Write a Shell Program to automate the process of collecting assignments from the directories of students of any specified class.
The person running the program should be able to pass a parameter to the... (1 Reply)
Discussion started by: ace_face
1 Replies
5. Solaris
Can we throw a window from solaris to Linux redhat? (1 Reply)
Discussion started by: mokkan
1 Replies
6. Shell Programming and Scripting
hi experts
yesterday, I asked a question that is very like today's quesion, I think this one will be more difficult than yesterday, I really want to get the answer
so I post here again
file1
arch : x86
install : pass
make os : pass
make build kernel : pass=100 failed=45
... (0 Replies)
Discussion started by: yanglei_fage
0 Replies
7. Shell Programming and Scripting
I bet this is really simple but I can only find silly long solutions.
Im trying to read the second word of each line in a file and pipe it out, in Win32 it looks something like:
for /F "tokens=2" %%b in (file.txt) do etc..
Sorry for the probably dumbass question! (1 Reply)
Discussion started by: joe19oo.c
1 Replies
8. Shell Programming and Scripting
Hi guys,
Completely new to all this and finding it soooooooo hard. Any help appreciated.
The idea is to check a list of .conf files and maintain a hash, if it does not match its hash it needs to do some more stuff, but I can't even get this first bit sorted... No idea if any of this is right.... (5 Replies)
Discussion started by: Jandiedonkerman
5 Replies
9. HP-UX
Hello there, first post here so go easy on me! :D
I just aquired an old HP 9000 Dclass d220 server, all I know is that it's running HP-UX, and it appears to boot fine (I see the modules loading, etc..)
Now, I have been an MS guy all my life (yeah I know, make fun of me), so I really have no... (9 Replies)
Discussion started by: Marvio
9 Replies
10. Shell Programming and Scripting
Hi guys!
Consider the following PERL script,
#!/usr/bin/perl
my $userID = `whoami`;
open(TMP, ">user.txt");
print TMP "$userID";
close(TMP);
Run on the command line it works no problem.
Run using crontab it doesn't work.
Where do I go to check errors from crontab?
I've read things... (25 Replies)
Discussion started by: Jaymoney
25 Replies
LEARN ABOUT OPENSOLARIS
creat
creat(2) System Calls creat(2)
NAME
creat - create a new file or rewrite an existing one
SYNOPSIS
#include <sys/stat.h>
#include <fcntl.h>
int creat(const char *path, mode_t mode);
DESCRIPTION
The function call
creat(path, mode)
is equivalent to:
open(path, O_WRONLY | O_CREAT | O_TRUNC, mode)
RETURN VALUES
Refer to open(2).
ERRORS
Refer to open(2).
EXAMPLES
Example 1 Creating a File
The following example creates the file /tmp/file with read and write permissions for the file owner and read permission for group and oth-
ers. The resulting file descriptor is assigned to the fd variable.
#include <fcntl.h>
...
int fd;
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
char *filename = "/tmp/file";
...
fd = creat(filename, mode);
...
USAGE
The creat() function has a transitional interface for 64-bit file offsets. See lf64(5).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
open(2), attributes(5), largefile(5), lf64(5), standards(5)
SunOS 5.11 25 Mar 2002 creat(2)