Re: Newbie Question - Help with design
From: Mike Chirico (mchirico_at_comcast.net)
Date: 12/13/03
- Next message: Måns Rullgård: "Re: thread and stack size"
- Previous message: Jamie: "Newbie Question - Help with design"
- In reply to: Jamie: "Newbie Question - Help with design"
- Next in thread: Måns Rullgård: "Re: Newbie Question - Help with design"
- Reply: Måns Rullgård: "Re: Newbie Question - Help with design"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 12 Dec 2003 20:37:22 -0500
"Jamie" <jamie@gnulife.org> wrote in message
news:20031212190126.L96527-100000@floyd.gnulife.org...
>
>
> Hello,
>
> I am studying the C language, and I work mostly with FreeBSD at my job.
> I need to write a program which will check all of the files in a
> directory, and if one is over 20 megs, I need to compress it and move it
> to an archive directory.
>
> I realize that it would be very easy to do this with a shell script,
> but since I am studying C, I would like to make a C program to do the job
> for the coding practice.
Well, for the people who have to uncompress that data, I'd recommend calling
the "zlib" library from your C program.
Take a look at minigzip.c in the download, which does it all. It can be
compiled as follows:
gcc minigzip.c -lz -o minigzip
And, anyone who has to use the files can just "gunzip" them; which will
probably keep them happy.
Regards,
Mike Chirico
- Next message: Måns Rullgård: "Re: thread and stack size"
- Previous message: Jamie: "Newbie Question - Help with design"
- In reply to: Jamie: "Newbie Question - Help with design"
- Next in thread: Måns Rullgård: "Re: Newbie Question - Help with design"
- Reply: Måns Rullgård: "Re: Newbie Question - Help with design"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|