Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE USE C PROGRAMMING LANGUAGE ! And ftw() fts() nftw() and similar functions are not allowed to use! 3. Directory traversal: largest file Write a
PLEASE USE C PROGRAMMING LANGUAGE !
3. Directory traversal: largest file Write a program in C named "maxfile" which takes zero or more command-line arguments which specify directories. Its output is a single line containing the path name of the largest file in any of those directories. If there are no command-line arguments, it searches the current directory (and below) The path name must be output in terms of the argument to maxfile. For example, if you run "maxfile foo", the output would look more like "foo/bar/bigfile" than like "/u/ajr/foo/bar/bigfile". Just concatenate the additional path name components to whatever string the user specifies You may impose a maximum path length of 1000 chars, but you must not exceed array bounds even if this path length would be exceeded (you can, however, abort with an error message in such cases, rather than having to deal with longer path names) You may not use ftw0. ftsO, nftwO,or similar library functions (the point of this assignment question is to implement the filesystem-tree traversal) And ftw() fts() nftw() and similar functions are not allowed to use!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started