Using fileio a What is the result of seek b Edit seekc to issue lseek against

Using fileio a what is the result of seek b edit

This preview shows page 2 - 3 out of 3 pages.

1.Using fileio a.What is the result of *seek? b.Edit seek.c to issue lseek against STDOUT [email protected]:~/CS510/apue.3e/intro$ ./shell1 % date Sat Jun 6 10:15:41 PDT 2015 % who radii pts/0 2015-06-06 07:54 (192.168.21.103) radii pts/3 2015-06-06 10:02 (192.168.22.4) % pwd /home/radii/CS510/apue.3e/intro % ls getcputc hello ls1 Makefile mycat.c shell1.c shell2.c testerror.c uidgid.c getcputc.c hello.c ls1.c mycat shell1 shell2 testerror uidgid % Press any key to continue...
Image of page 2
i.What did you change? ii.What were the results? c.Edit hole.c to: i.Change the offset for the SEEK_SET to 409 ii.Change the offset for the write to 4096 iii.Execute the function iv.What is the size of file.hole? v.file.hole? d.Compile & run fileflags i.What are the flags for STDIN? ii.What are the flags for STDOUT? 2.Can you name one object in a UNIX/Linux system that might not have a file descriptor? Chapter 4 1.Using filedir a.Compile & run filetype.c i.What is the filetype for STDIN? ii.What is the filetype for /root? iii.What is the filetype for ftw8.c? b.Compile & run access.c i.What is the filetype for ~? ii.What is the filetype for /root? iii.What is the filetype for ftw8.c? c.In cdpwd.c i.Edit to point to a valid directory ii.Compile & run the function iii.Do you wind up where you expect? 2.In the same directory, using umask.c a.Change it to set RW for only the GID b.What did you change? i.What is the mask for foo? ii.What is the mask for bar?
Image of page 3

You've reached the end of your free preview.

Want to read all 3 pages?

  • Summer '19
  • filetype, Makefile mycat.c shell1.c, hello.c ls1.c mycat, shell2.c testerror.c uidgid

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture