The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I've attached a file describing what I need to get done. Can someone write me this code and include comments in the code to describe what is happening at each part?
SFWRENG 3SH3: Operating SystemsLab 5: File SystemDr. Borzoo Bonarkdarpour1BackgroundIn this lab assignment you will study how the UNIX file system is structured and which datastructures are used to represent different objects and which system calls work with this datastructures.It is assumed that you are familiar with the following UNIX commands:•df•ls•ln2InodesIn a Unix-based file system, theinodeis a data structure used to represent a filesystemobject, which can be one of various things including a file or a directory. Eachinodestoresthe attributes and disk block location(s) of the filesystem object’s data. Filesystem objectattributes may include manipulation metadata (e.g. change, access, modify time), as well asowner and permission data (e.g. group-id, user-id, permissions).In this assignment, you are to write a program that completes two tasks: (1) reportingfile attributes, and (2) traversing directories. That is, if the input argument to the programis a file, the program will print the file’s attributes. if the input argument to the program isa directory, the program will traverse the directory recursively.2.1File AttributesIn this part of the assignment you will learn about thestat(2)system call and thestatstructure that it returns. Observe that there are severalstatfunctions, use the right onein the right place, especially for symbolic links. Thestatstructure contains a number ofattributes with information from a file’s inode.1
Attachments: