Program similar to 'pwd' command
$20-25 USD
Pago na entrega
The purpose of this assignment is to write a program similar to 'pwd' command. Give the name 'spwd' to your executable file. Description You will write a program spwd, which will display the path to current directory. e.g. $spwd The output of the program will be something like this: /home/yourname/CS202/lab05 This long path name is not stored in the current directory. the current directory calls itself "." and has an inode number. the directory is just a node in a set of linked nodes. How spwd will work: spwd actually climbs up the tree, directory bu directory, noting at each step the inode number for dot, and then looking through the parent directory for the name assigned to that inode number, until it reaches the top of the tree. How do we know when we reach the top of the tree? In the root directory of a UNIx file system, ".", ".." point to the same inode. Our version of pwd repeats until it gets to a directory in ehich inode numbers for "." and ".." are equal. Note: You may have to use stat()/lstat(), opendir(), readdir(), chdir(), functions in addition to other functions.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement 3)Sufficient Comments
## Platform
Unix
ID do Projeto: #3110202