Date: Thu, 31 May 2001 17:04:46 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: David Witbrodt cc: "Nimrod A. Abing" , DJGPP mailing list Subject: Re: FAQ saves the day In-Reply-To: <3B1520FF.225C54BA@alpha.delta.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 30 May 2001, David Witbrodt wrote: > > FWIW, you could have just downloaded and installed the fil???b.zip package > > which contains the `ls', `df', and `du' commands. These commands will list > > the contents of a directory, show (estimate?) remaining disk space, and > > show how much space a file or directory uses. With the --color=auto > > command-line option to `ls' you can get colored output on your colored > > monitor. To get paging, there is the `less' pager that comes in its own > > package. > [...] > Besides, in real life reinventing the wheel is probably silly, but > in programming (and other technical subjects) it is usually quite > necessary, in my view. I watch C++ students sweat blood every > semester trying to learn how to use array indexing correctly, set up > and manipulate linked lists without error, and simply get cout to > format their output the way they want it. Since I haven't installed > fil316b, I don't know whether I can get ls, df, and du (or a script > using them) to do exactly what I want, but I do know that this program > I'm writing -- which is nearly finished and works pretty good so far > -- _does_ do exactly what I want. And I disagree: it _is_ good > practice. Even if you do want to reinvent the wheel, you might benefit from looking into the sources of `ls' to see how does it go about colorizing the output. You can then choose whether to use the same method or do something different. After all, that's what's great about Free Software: the sources are there to be perused and studied.