Create Sparse Copies of files

Code junkies hangout here

Moderators: ChriThor, LXF moderators

Create Sparse Copies of files

Postby _cih_ » Tue Oct 10, 2006 9:14 pm


I have a problem doing my assignment, I am not trying to ask someone to solve it for myself, but if Someone could give me some links or hints , which will help me solve it, I would be very thankful.

Problem :

Write a C program that makes a sparse copy of a file : file and copy must compare equal, but if the file contains large blocks of NUL bytes, then the sparse copy must take much less space than an ordinary copy.
Last edited by _cih_ on Wed Oct 11, 2006 1:20 pm, edited 1 time in total.
Posts: 10
Joined: Wed Sep 13, 2006 4:50 pm

RE: Create Sparse Copies of files

Postby nelz » Tue Oct 10, 2006 10:14 pm

Code: Select all
cp --sparse...
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
Site admin
Posts: 9008
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest