Answered step by step
Verified Expert Solution
Link Copied!

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 !
And ftw() fts() nftw() and similar functions are not allowed to use! image text in transcribed
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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain how multiswitch VLANs work.

Answered: 1 week ago