1.

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.

The difference between fcntl anf ioctl is that the former is intended for any open file, while the latter is for device-specific operations.



Discussion

No Comment Found