Select Page

University of Central Florida File System Utilitie Programming Project

Question Description

I’m working on a operating systems project and need support to help me learn.

1. Stat: Write your own version of the command line program stat, which simply callsthe stat() system call on a given file or directory. Print out file size, number of blocksallocated, reference (link) count, file permissions, and file inode.Useful interfaces: stat()

2. List Files: Write a program that lists files in the given directory. When called withoutany arguments, the program should just print the file names. When invoked with the -lflag, the program should print out information about each file, such as the owner, group,permissions, and other information obtained from the stat() system call. The programshould take one additional argument, which is the directory to read, e.g., myls -ldirectory. If no directory is given, the program should just use the current workingdirectory.Useful interfaces: stat(), opendir(), readdir(), getcwd().2

3. Tail: Write a program that prints out the last few lines of a file. The program should beefficient, in that it seeks to near the end of the file, reads in a block of data, and then goesbackwards until it finds the requested number of lines; at this point, it should print outthose lines from beginning to the end of the file. To invoke the program, one should type:mytail -n file, where n is the number of lines at the end of the file to print.Useful interfaces: stat(), lseek(), open(), read(), close().

4. Recursive Search: Write a program that prints out the names of each file and directoryin the file system tree, starting at a given point in the tree. For example, when run withoutarguments, the program should start with the current working directory and print itscontents, as well as the contents of any sub-directories, etc., until the entire tree, root atthe CWD, is printed. If given a single argument (of a directory name), use that as the rootof the tree instead.

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now