Create the following types of a files using (i) shell command (ii) system call
symlink system call)link system call)mkfifo Library Function or mknod system call)Write a simple program to execute in an infinite loop at the background. Go to /proc directory and identify all the process related information in the corresponding proc directory.
Write a program to create a file and print the file descriptor value. Use creat() system call
Write a program to open an existing file with read write mode. Try O_EXCL flag also.
Write a program to create five new files with an infinite loop. Execute the program in the background and check the file descriptor table at /proc/pid/fd.
Write a program to take input from STDIN and display on STDOUT. Use only read/write system calls
Write a program to copy file1 into file2 ($cp file1 file2).
Write a program to open a file in read only mode, read line by line and display each line as it is read. Close the file when end of file is reached.
Write a program to print the following information about a given file.
Write a program to open a file with read write mode, write 10 bytes, move the file pointer by 10 bytes (use lseek) and write again 10 bytes.
lseekod and check the empty spaces in between the data.Write a program to open a file, duplicate the file descriptor and append the file with both the descriptors and check whether the file is updated properly or not.
dupdup2fcntlWrite a program to find out the opening mode of a file. Use fcntl.
Write a program to wait for a STDIN for 10 seconds using select. Write a proper print statement to verify whether the data is available within 10 seconds or not (check in $man 2 select).
Write a program to find the type of a file.
Write a program to display the environmental variable of the user (use environ).
Write a program to perform mandatory locking.
Write a program to simulate online ticket reservations. Implement a write lock. Write a program to open a file, store a ticket number, and exit. Write a separate program, to open the file, implement write lock, read the ticket number, increment the number, and print the new ticket number then close the file.
Write a program to perform Record locking.
Create three records in a file. Whenever you access a particular record, first lock it then modify/access to avoid race condition.