Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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

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

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


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

The file's hash will be find outd using the SHA1 hashing algorithm. A library for calculating this hash can be found in .

When a duplicate file is discovered, you will create a symbolic link to the 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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M988815

Have any Question?


Related Questions in Computer Engineering

A chemistry student needsnbsp700 ml of dimethyl sulfoxide

A chemistry student needs 70.0 mL of dimethyl sulfoxide for an experiment. By consulting the  CRC Handbook of Chemistry and Physics , the student discovers that the density of dimethyl sulfoxide is 1.10 g.cm^-3. Calculat ...

A population has a mean72 and a standard deviation sigma28

A population has a mean=72 and a standard deviation σ=28. Find the mean and standard deviation of a sampling distribution of sample means with sample size n=49.

Question in a survey of 182 insurance policies the

Question : In a survey of 182 insurance policies, the following data was obtained 67 policy holders are female. 89 policy holders are under age 30 62 policy holders are married 35 policy holders are women under age 30 31 ...

Suppose you bought a five-year zero-coupon treasury bond

Suppose you bought a five-year zero-coupon Treasury bond with $ 1000 face value for $800. Answer the following questions: (a) What is the yield to maturity on the bond? (b) Assume the yield to maturity on comparable bond ...

Subnetting1 as system administrator you need to create 10

Subnetting 1) As system administrator, you need to create 10 subnets for the Network Address: 192.168.1.0 with a minimum of 10 hosts per subnet. Room for future expansion to more subnets is desirable. Create a table with ...

What are the minimum and maximum values in decimal if an

What are the minimum and maximum values (in decimal) if an 8-bit binary number is given unsigned and two's complement formats?

Given an undirected graph with both positive and negative

Given an undirected graph with both positive and negative edge weights, design an algorithm to find a maximum spanning forest with the largest total edge weights.

Security planfor this assignment you will write some

Security Plan For this assignment, you will write some security planning documents for the Computer Science department. There are 4 different types we will be concerned with for this project (enterprise, issue-specific, ...

Question part 1 answer below question with atleast 350

Question: Part 1: answer below question with atleast 350 words in APA format no plagrism and also I need two professional refrences 1) What is the power of scenario planning Part 2: answer below question with atleast 350 ...

In 2005 team dad used a toyota truck with a system of

In 2005, Team DAD used a Toyota truck with a system of spinning lasers as its "visual" system. What advantages and or disadvantage does such a system have compared to camera-based systems?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As