Menu

[Solved]Create C Program Makes New Directory Containing Links Files Working Directory Subdirectori Q37258232

Create a C program that makes a new directory containing linksto all files in the working directory and all of itssubdirectories. The links should all be created in a singledirectory with names that show all of the original directorylevels, separated by a dot “.”

Useful functions include:
• link as discussed in Molay Ch. 4.
• mkdir as discussed in Molay Ch. 4.
• chdir(char *directory) as discussed in Molay Ch. 4.
• sprintf for creating custom, formatted strings.
• getcwd(char *string, int string_size) to store the currentworking directory in string of size string_size.• strcmp foridentifying directory names to avoid (“.”, “..”, and the name ofyour links directory)

  • Directories can be traversed by using recursion and the chdirfunction

  • When checking whether a directory entry is a directory, becareful to ignore “.”, “..”, and your links

    directory. You can use strcmp for this purpose.

Expert Answer


Answer to Create a C program that makes a new directory containing links to all files in the working directory and all of its subd… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *