Question: Assembly Language problem (NASM) The goal is very simple. Your program should take a file name and print the time since the file was last

Assembly Language problem (NASM)

The goal is very simple. Your program should take a file name and print the time since the file was last modified. The tool you need to determine when a file was last modified is stat() or fstat(). These will return a lot of information about a file. You can ignore almost all of this information except for the time modified. See http://manpages.ubuntu.com/manpages/wily/man2/lstat.2.html Additional discussion: https://stackoverflow.com/questions/11765683/how-toread- file-folder-properties-in-linux Note that stat can be used from the command line as well (see http://labtestproject.com/linuxcmd/stat.html) but we want to call it as a function. Time.h: http://pubs.opengroup.org/onlinepubs/007908775/xsh/time.h.html Discussion of the difference between timeval and timespec: https://stackoverflow.com/questions/31275131/c-timeval-vs-timespec https://stackoverflow.com/questions/11153334/timespec-not-found-in-time-h Aside: ISO 8601 date format: https://askubuntu.com/questions/355188/dateformat- What your code should do: 1. Your code should use STDIN and STDOUT for input and output. (This is the default.) Use redirection on the command line to read from a file and write to a file. Or you can take the file name from the command line. 2. Your code should take a file name as input. 3. The code should output the length of time since the file was last modified. The format is days, hours, minutes and seconds. 4. The program should call stat() or similar function to get the modification time of the file in question. 5. This program should use glibc functions for input and output..

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!