Message-ID: <3B1520FF.225C54BA@alpha.delta.edu> Date: Wed, 30 May 2001 12:34:07 -0400 From: "David Witbrodt" X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en,ja MIME-Version: 1.0 To: "Nimrod A. Abing" CC: DJGPP mailing list Subject: Re: FAQ saves the day References: <3 DOT 0 DOT 1 DOT 32 DOT 20010530160818 DOT 0070ac7c AT wingate> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com "Nimrod A. Abing" wrote: > > At 01:02 PM 05/29/2001 -0400, you wrote: > > I've been working on a program to list the files in a directory (my > >own personal replacement for "dir"), in color, with auto-paging, with > >drive space statistics, etc. > > 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. Thanks for the tip. I downloaded fil316b.zip (along with bash) almost a year ago, but never installed them. I'm in sort of a tough spot because I don't have a computer of my own at home -- I try to play around a little at work, and I have a bunch of stuff loaded onto my parents' machine, but can't really use that very often. I might finally have a home machine of my own in August, at which point I hope to partition and load up DOS, Win98, and Debian. I'll then have better access and more time to learn, including finally diving into all the DJGPP source files I downloaded. > Although it's good practice to actually write programs, it's not good > programming practice to ``reinvent the wheel'' ;-) Well, I work as a math and chemistry tutor: the "wheel" gets reinvented around here every semester. This program was a project I attempted back around 1992, but never finished. I always felt bad about that, but other matters intervened and took a hiatus from my programming hobby for about 7 years after the monitor died on my 486. I had a program someone else had written (called d.exe) that I really liked, and wanted to write a version that would adjust to screen sizes other than 80x25. So, it's a personal thing, I guess. 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. Thanks again for the tip, though. Dave W.