Question: The program should take the directory name from where to start file traversal as a command - line argument and list all files in the

The program should take the directory name from where to start file traversal as a
command-line argument and list all files in the directory hierarchy.
If the program is executed without any arguments, it should start from the current
working directory.
If the program encounters other directories, it should list the directory name first,
followed by the files with one-tab indentation for each level of depth.
Symbolic Links
If a file is a symbolic link, the program should display the symbolic link name and, in
parentheses, the file that the link points to.
Command-Line Options
The program should support the following options:
-S
List all files along with their sizes in parentheses next to their names.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!