07-24-2011
Read , read , read , understand , test and read more further
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have 6 extra hard drives and want to install them in my boxes and run UNIX, LINUX andyes M$ Winblows. How do I make it so i have the choice of which HD to boot from? Also, which UNIX distribution should i run to get aquainted with it, and wheres the best place to get it? Thank you very much if... (5 Replies)
Discussion started by: r1sk
5 Replies
2. Programming
I just want to get the read() system call to do it's thing! LOL It's now 3:30 AM in the morning, and as I'm the stubborn type I don't like to go to bed with unsolved code :) However I submit humbly now to anyone who can show me what my dumb mistake is. The program imitates a daemon process that so... (6 Replies)
Discussion started by: johnsonmj
6 Replies
3. UNIX Desktop Questions & Answers
I am a long-time Windows NT, 2000 user at home and work. I want to learn Unix to broaden myself. What flavor do you recommend and how do you recommend practicing with it at home? how to get a copy of it to practice with? (1 Reply)
Discussion started by: robmaxfli
1 Replies
4. UNIX for Advanced & Expert Users
I wanted to know what email app most Sun solaris / unix gurus use ? I have become quite NON microsoft in the last few months in my studying solaris..
thanks
simon2000 (6 Replies)
Discussion started by: simon2000
6 Replies
5. Shell Programming and Scripting
Hi,
I have written the following UNIX for HP-UX 11i. The script basically checks for files older then 45mins in 2 repective directories and then sends and email to the administrator about them.
Problem with the script is that I can run it from the command line and crontabtab but 80% of the... (2 Replies)
Discussion started by: budrito
2 Replies
6. Shell Programming and Scripting
Hi ,
I wanted to find delata between two huge ( 8 GB ) files . Say file_TDY and file_YDY : These files are sorted based on a key .
I am using a command :
1)bdiff file_TDY file_YDY > diff_file
2) grep ' ^< ' diff_file > TDY_delta
I wanted only the changed records and newly added... (2 Replies)
Discussion started by: ajaybalki
2 Replies
7. UNIX for Dummies Questions & Answers
I learned Unix about 6 years ago, I think it was the System V version back then.
My course taught me, Unix commands, shell scripting, Vi editor, and probably more stuff.
I wanted to stick with Unix but life didn't allow me to, my college back then used Windows 95 and then my job as a... (8 Replies)
Discussion started by: thoughts
8 Replies
8. UNIX for Dummies Questions & Answers
I originally sent this as a PM to Neo, but I was ignorant towards the rule of PMing someone with technical information. Below is a copy / paste of the questions I asked. If anyone can help, I'd appreciate it tons. Thank you! :D
The first OS I ever encountered was DOS and Windows 3.1. Ever since... (1 Reply)
Discussion started by: ZeeSquared
1 Replies
9. UNIX for Dummies Questions & Answers
Firstly I do need to state that I am turning here as a last resort. Im in my first year of a Computer Networking and technical support course, and as a first year I must complete a Introductory Unix/Linux class. I have been doing well in the course so far however I have been stumped on the final... (1 Reply)
Discussion started by: setaylor5
1 Replies
READ(2) System Calls Manual READ(2)
NAME
read - read input
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
ssize_t read(int d, void *buf, size_t nbytes)
DESCRIPTION
Read attempts to read nbytes of data from the object referenced by the descriptor d into the buffer pointed to by buf.
On objects capable of seeking, the read starts at a position given by the pointer associated with d (see lseek(2)). Upon return from read,
the pointer is incremented by the number of bytes actually read.
Objects that are not capable of seeking always read from the current position. The value of the pointer associated with such an object is
undefined.
Upon successful completion, read return the number of bytes actually read and placed in the buffer. The system guarantees to read the num-
ber of bytes requested if the descriptor references a normal file that has that many bytes left before the end-of-file, but in no other
case.
If the returned value is 0, then end-of-file has been reached.
RETURN VALUE
If successful, the number of bytes actually read is returned. Otherwise, a -1 is returned and the global variable errno is set to indicate
the error.
ERRORS
Read will fail if one or more of the following are true:
[EBADF] D is not a valid descriptor open for reading.
[EFAULT] Buf points outside the allocated address space.
[EIO] An I/O error occurred while reading from the file system.
[EINTR] A read from a slow device was interrupted before any data arrived by the delivery of a signal.
[EAGAIN] The file was marked for non-blocking I/O, and no data were ready to be read.
SEE ALSO
dup(2), fcntl(2), open(2), pipe(2), write(2).
4th Berkeley Distribution May 23, 1986 READ(2)