Question: Please use SYSTEM CALLS ONLY. Answer quickly for a thumbs up!!! 2. Reverse a file and write its data either to the screen or to
Please use SYSTEM CALLS ONLY. Answer quickly for a thumbs up!!!

2. Reverse a file and write its data either to the screen or to another file (lastnameRV.c): Write a C program (call it lastnameRV) that will reverse the content of a file and prints either to the screen or into a file ( -f flag). The command: - Takes either one or two file names (source file sFile, and destination file dFile) as input - Takes the following flag combinations: - f: if the dFile exists, its content is overwritten with the reversed content of sFile The commands below show the results given the following files: file contains: "This is the content of file 1." $lastnameRV filel .1 elif fo tnetnoc eht si siht. Will be displayed on the screen. $lastnameRV -f filel file2 file content will be: .1 elif fo tnetnoc eht si siht. Other input combinations should give the user hint messages of how to use the command. [-] reverse -f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
