Questionexecute a recursive directory traversal as walking

Assignment Help Computer Engineering
Reference no: EM13348550

Question

Execute a recursive directory traversal. As walking the file tree, you will be looking for duplicate files and creating symbolic links to them.

To accomplish directory traversal, you should write a recursive function using the dir family of functions: opendir(), readdir(), chdir() and closedir(). A prototype could look something like this-

void find_unique_files(const char*, char**);

The function have to take a character array representing a filename and an array of strings. If it is known on a directory, it should move into that directory and continue its traversal. If it is known on a text file, it has to generate a hash for text file, check the list of hashes to make sure that it does not already contain that hash, and then insert it if it doesn't. If it does, you know that you have found a duplicate.

The file's hash will be designed using the SHA1 hashing algorithm. A library for calculating this hash is able to be found in <openssl/sha.h>.

When a duplicate file is discovered, you will create a symbolic link to duplicate (the one which cannot be added to the list) in the /dups directory using the symlink() function

Symlink - pathname to a file, in fact a string.

 

Reference no: EM13348550

Questions Cloud

Questionuzi company received a charter granting the right : questionuzi company received a charter granting the right to issue 200000 shares of 1 par value common stock and 10000
Question 1a evaluation of the duration and degree of : question 1a evaluation of the duration and degree of disability after an occupational accident with a single body
Questiontwo parties a and b try to communicate with : questiontwo parties a and b try to communicate with following encryption scheme-both sides agree on same long random
Questionwinner corporation acquired 80 of the common : questionwinner corporation acquired 80 of the common shares and 70 of the preferred shares of first corporation at
Questionexecute a recursive directory traversal as walking : questionexecute a recursive directory traversal. as walking the file tree you will be looking for duplicate files and
Question 1a what are the top four major causes of : question 1a what are the top four major causes of construction fatalities?b explain using examples the necessary
Questionin visual basic 2010 please give completed : questionin visual basic 2010. please give completed application as a .zip filea small airline has just purchased a
Questionrowe furniture corporation is a virginia-based : questionrowe furniture corporation is a virginia-based manufacturer of furniture. in a current quarter it reported the
Questionshoogi perak limited is a manufacturer of pictures : questionshoogi perak limited is a manufacturer of pictures tubes used in assembling t.v sets. the subsequent are

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd