|
INTERVIEW QUESTIONS
OPERATING SYSTEMS
UNIX
DETAILS
Question: What are the Unix system calls for I/O?
Answer: open(pathname,flag,mode) - open file creat(pathname,mode) - create file close(filedes) - close an open file read(filedes,buffer,bytes) - read data from an open file write(filedes,buffer,bytes) - write data to an open file lseek(filedes,offset,from) - position an open file dup(filedes) - duplicate an existing file descriptor dup2(oldfd,newfd) - duplicate to a desired file descriptor fcntl(filedes,cmd,arg) - change properties of an open file ioctl(filedes,request,arg) - change the behaviour of an open file The difference between fcntl anf ioctl is that the former is intended for any open file, while the latter is for device-specific operations.
|
|
|
Category |
UNIX Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8589 users |
Added on |
9/22/2014 |
Views |
69190 |
Rate it! |
|
|
Question:
What are the Unix system calls for I/O?
Answer:
open(pathname,flag,mode) - open file creat(pathname,mode) - create file close(filedes) - close an open file read(filedes,buffer,bytes) - read data from an open file write(filedes,buffer,bytes) - write data to an open file lseek(filedes,offset,from) - position an open file dup(filedes) - duplicate an existing file descriptor dup2(oldfd,newfd) - duplicate to a desired file descriptor fcntl(filedes,cmd,arg) - change properties of an open file ioctl(filedes,request,arg) - change the behaviour of an open file The difference between fcntl anf ioctl is that the former is intended for any open file, while the latter is for device-specific operations. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Brief about the directory representation in UNIX OS?
|
View Answer
|
|
What is inode in UNIX OS?
|
View Answer
|
|
How are devices represented in UNIX OS?
|
View Answer
|
|
What is the easiest way to store variables and explain?
|
View Answer
|
|
Explain about fork?
|
View Answer
|
|
Describe the process of “spname”?
|
View Answer
|
|
What function does “errno” do?
|
View Answer
|
|
Explain about read slow?
|
View Answer
|
|
What are the special arrangements to make a terminal i/p and o/p?
|
View Answer
|
|
Explain abut low-level I/O?
|
View Answer
|
|
Suppose that you are using a terminal in which the screen size is bigger than the normal 24 lines. If you want to use p and take full advantage of your terminal capabilities what choices are open to you?
|
View Answer
|
|
Explain about ZAP?
|
View Answer
|
|
Describe about the root file system?
|
View Answer
|
|
How to search files for lines that match a pattern?
|
View Answer
|
|
Explain about cat?
|
View Answer
|
|
How to get a computer aided instruction?
|
View Answer
|
|
Explain about TYPE-ahead?
|
View Answer
|
|
Explain about DELETE and BREAK?
|
View Answer
|
|
Explain about the return key?
|
View Answer
|
|
What exactly is UNIX?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All UNIX Interview Questions & Answers - Exam Mode /
Learning Mode
|