The document contains instructions for an assignment with 5 questions. Question 1 asks to justify whether system calls or procedure calls are better. Question 2 involves creating a large file, moving its contents using system calls and library functions with different buffer sizes, and comparing the time taken. Question 3 is to write a program to delete all files in a given directory. Question 4 is to compare and contrast perror() and stderr() with examples. Question 5 involves changing a file's permissions and creating a directory tree structure.
The document contains instructions for an assignment with 5 questions. Question 1 asks to justify whether system calls or procedure calls are better. Question 2 involves creating a large file, moving its contents using system calls and library functions with different buffer sizes, and comparing the time taken. Question 3 is to write a program to delete all files in a given directory. Question 4 is to compare and contrast perror() and stderr() with examples. Question 5 involves changing a file's permissions and creating a directory tree structure.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online from Scribd
The document contains instructions for an assignment with 5 questions. Question 1 asks to justify whether system calls or procedure calls are better. Question 2 involves creating a large file, moving its contents using system calls and library functions with different buffer sizes, and comparing the time taken. Question 3 is to write a program to delete all files in a given directory. Question 4 is to compare and contrast perror() and stderr() with examples. Question 5 involves changing a file's permissions and creating a directory tree structure.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online from Scribd
Ques 1: “System calls are better or procedure calls”. Justify
Ques 2: Write a C program to create a file at least of 2 MB with command
ls -R / >file1.txt and move contents of the file to another file using a) System call(open, read and buffer of 10 KB) b) Library functions 1. fgets, fputs 2. fgetc, fputc c) System call(with buffer of 20 bytes) Also calculate and compare the time taken by each of the above and
which is better.
Ques 3: Write a C program which takes directory name as input and delete all files, within that directory.
Ques 4: Compare and contrast perror( ) and stderror( ) with examples.
Ques 5: write a C program
a) To input file name and change its permissions to reading by all and writing by owner only. b) To create a following tree structure in current directory.