|
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.2) By 7550 users |
Added on |
9/3/2014 |
Views |
68118 |
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
|
View Answer
|
|
What is 'inode'?
|
View Answer
|
|
How are devices represented in UNIX?
|
View Answer
|
|
How do we know how a particular session is scheduled?
|
View Answer
|
|
Explain the types of interrupts in detail?
|
View Answer
|
|
I need to write a command using redirection characters to output the number of unique users working on your system.
|
View Answer
|
|
What are signals in UNIX?
|
View Answer
|
|
Unix command to concatenate (attach) two strings?
|
View Answer
|
|
How to read error messages in /var/adm/messages when system is not booting.
|
View Answer
|
|
How to find some partuicular lines in unix Vi editor which starts with a paricular word and end with another particular word?? For ex - There are 10 lines in the editor and only 4 lines start with the word APPLE and end with the word MANGO.Now how to find out these particular lines in Unix .
|
View Answer
|
|
Where is kernel located in unix?
|
View Answer
|
|
Construct pipes to execute the following jobs.
|
View Answer
|
|
How is the command “$cat file2 “ different from “$cat >file2
|
View Answer
|
|
Explain the steps that a shell follows while processing a command.
|
View Answer
|
|
Which command is used to delete all files in the current directory and all its sub-directories?
|
View Answer
|
|
How many prompts are available in a UNIX system?
|
View Answer
|
|
How does the kernel differentiate device files and ordinary files?
|
View Answer
|
|
How to switch to a super user status to gain privileges?
|
View Answer
|
|
What are shell variables?
|
View Answer
|
|
What is redirection?
|
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
|