Fog Creek Software
Discussion Board




What allows GNU/Linux to produce good software?

I'm not a programmer, but consider myself a "power-user" (whatever that means). I'm curious about what people think has allowed GNU/Linux to evolve into a stable, high-quality environment, with some very excellent UI environments (my favorite is WindowMaker, along with Xfce) in so short a time, despite relying almost solely on volunteer contributions.

dh003i
Tuesday, March 18, 2003

I think it may partly be the goals.

For instance: I wanted a CD catalogging program. I wanted a specific set of features. I wrote it, and I released it, and it's been months since an update, because what's there just works.

I think the issue is at least partly (though almost certainly not entirely) due to the fact that much open software has well defined goals.

Contrast with commercial software: Even assuming the requirements stay the same during development of the first release, the company will drive to release another version, just so they can garner upgrade revenue. This leads to having to show a bigger feature list than the previous version. I submit that this leads to management strapping on features solely to lengthen the list, with poor requirements, and little consideration to how it will impact the existing codebase.

Good software isn't written that way in either the open or closed world.

Just a thought.

Mike Swieton
Tuesday, March 18, 2003

Interesting thoughts.  That's a good point.  FS and OSS developers are developing the software either because they think it would be a good thing for the community to have, or because they want it themselves.  Their only motivation is to produce quality software.  They don't need to justify upgrades to the consumer, since they (usually) aren't charging money for their software, though the GPL allows them to do that.  Thus, they probably only implement features which are needed and useful, and spend alot more time focusing on fixing bugs, stability issue, security issues, and performance issues, as well as possibly minor UI issues.

Then, of course, there's the "many eyes" thing.

dh003i
Tuesday, March 18, 2003

You will notice that there's multiple ways to do anything..

There's FreeBSD, OpenBSD, NetBSD, and Linux all available.  There's GNOME, XFCE, and KDE.  There's WindowMaker, Blackbox, and many many more.  There's several versions of vi and emacs.

It's easy for the free software world to subsist with volunteer effort because you have many many teams of people who have an image of the perfect system and are very interested in trying to create it.  The free software world exists because programmers are dissatisfied at work therefore they want to do something *right* at home and because programmers are dissatisfied with the system they have to work with.

Furthermore, open source projects either are small enough that they can be done by a single person and therefore need no process, or they survive because of their unique psuedo-lightweight process.  In the case of the Linux kernel, it's mostly a matter of doing whatever you want, convincing Linus or one of the other major developers your patch is a good idea, and then merging it into the kernel at the right time.  Very little red tape involved, just patches dropped on the floor.

flamebait sr.
Tuesday, March 18, 2003

Just because the software is free doesn't mean the developers are writing the code for free. Some of these developers are paid with grants, donations, or by big companies to program. GNU has been around since the mid 80s and unix has been around since the 60s. This isn't exactly a short time.

bdw
Tuesday, March 18, 2003

Not to be overly flamebait-ish, but who says GNU/Linux produces good software?  I'm sure it's fine if you're already a *nix weenie, but frankly, Linux is directly responsible for my having purchased the iBook I'm using to enter this message.  KDE crashed regularly (and, as a bonus, was spectacularly ugly), GNOME and Enlightenment wouldn't work at all, and I spent *days* trying to get samba to talk to my Win2k PC to no avail.

Frankly, I think any definition of 'good' software *has* to include 'usable,' and Linux usability is in the toilet.  This may be because of the 'fifteen pixels of fame' problem, or the 'inmates running the asylum' problem (I definitely include myself in that number; I've created some pretty shocking UIs).

Sam Gray
Tuesday, March 18, 2003

Sam:

Unix systems have come up with some of the worst syntaxes, user interfaces, names, and other things I've ever seen. But out of it has also come some of the best. I really hate the KDE UI. Stability has improved, I believe, though. OTOH, Ion, a rather... 'different' window manager, meets my rather particular needs perfectly.

And while troff syntax for man pages may be the worst bastardization of a typesetting language I've ever had the misfortune to lay my eyes on, there are many good things too: Great free XML parsers. Tomcat, Apache, some of the SQL servers (I'm not going to evangalize them here, just note that a massive scale project does extremely well all things considered).

My point is this: For a large number of people, free software is the best way to do what they want to do. I don't need to pay top dollar for Visual Studio, because my system is perfectly setup for my needs. I have KDevelop if I want it (Which I don't but that's besides the point). I have vim, automake, autoconf, make, perl, ant.

But then again, I'm not a graphic designer. Hell, I try to avoid writing GUIs even.

Unix may not be right for you, but for the last handful of years, it has been the ideal platform for what I use it for, and presumably, for others as well, because it gets used.

Also, if I wanted a laptop, it'd be an iBook too.

Mike Swieton
Tuesday, March 18, 2003

Honestly I don't think OSS gives any of the supposed advantages that advocates claim other than it being free -- as in price.

For every Linux, or *BSD, or Apache there are thousands of horribly crappy open source projects.  The 'success' rate, if you measure success in terms of technical achivement, is really not any better (and arguably it is worse) for OSS than closed source.

Also, to say Linux was developed 'so quickly' is a bit of a misstatement.  Linux has been around a long, long time, and is just recently (past few years) catching up to some of the technology that has been in other OSes (like Solaris, AIX) for over a decade..Things like usable SMP, journaling file systems, etc.

Flippy the Binhead
Tuesday, March 18, 2003

I'm not going tell you that GNU/Linux is as easy to use as Windows or Mac for the newbie.  However, it is improving at a break-neck pace.  I'm not going to, however, defend programs which are poorly designed and have poor UIs and inconsistency.

However, many applications are easy to use once you have them set up.  Remember in Windows everything comes set up for you.  Lots of people would be saying "Gee, this Linux 8.0 is pretty darn easy to use," when they really mean RedHat GNU/Linux 8.0.  By that, of course, they would -- like most newbies -- be referring to the OS, WM, DE, and applications all as "Linux".  I personally use WindowMaker and Xfce with GNUstep apps whenever possible (unfortunately, no GNUstep web-browser, LyX, spreadsheet program, database, yet), and am very pleased with my apps.

Of course, the user is always right, and if GNU/Linux wasn't cutting it for you, there's probably alot of other people who were having the same problems as you were.  At least in regards to the UI, what specific problems bothered you?  (I may pass these on the the relevant parties).

dh003i
Tuesday, March 18, 2003

Whilst I agree with the "thousands of crappy apps" sentiment, I think that's actually part of the reason.

The low barrier to entry (low end PC, a borrowed CD -> a full development environment) means that there are thousands of people hacking away on their own projects. By a sheer scattergun approach some, even just a few of them, hit their target. It's almost like a return to the days of the Apple II and the computer clubs - someone somewhere is writing todays equivalent of Visicalc because they can.

There's also an aspect of building on each other's work: this was the original goal of RMS's open source - never write the same code again. In the commercial world, it's common to keep writing the same code (or code to do the same job) over and over again, for no other reason than because you need to "own" it. GNU/Linux in particular, but open source in general means that you can use someone else's code instead.

I think it's those two things combined: The low barrier to entry lets people start things, and then the openness gives other people the ability to pick up the ball and run with it.

Katie Lucas
Wednesday, March 19, 2003

To keep a long story short -- I do believe the true reason for why FS/OSS is 'better' is because the developer is the customer.
The longer story --
There are no Product Manager, Marketing Droids(tm) and/or Focus Groups between the developer and the end-user -- The developer IS the end-user, he is answering real needs, his own. If anyone needs a specific feature, he may develop it himself.
Now the only area in which Linux lacks, is the 'wholesome UI' issue, which I believe is where Product Managers, Marketing Droids(tm) and Focus Group do some good. Because customer needs in this area must be 'measured' -- developers are not 'esthetic sensitive', IMHO this is because they are mostly male...
One point to poster Sam above, who is writing on an iBook -- please note that Mac OS X's is FreeBSD beneath the hood. While the shell (the UI) is the commercial Apple product.

Tal Rotbart
Wednesday, March 19, 2003

Hm. That's an interesting theory. So Open Source is good at developing apps and stinks at UI work. Maybe that's because the two are fundamentally different.

Application Development is problem solving, while UI design is fundamentally artistic. And based on psychology, yadda yadda. So if you don't feel comfortable with not being artistic, call it hard and soft science instead.

So, to turn this question on its head, flip it sideways and shake it a bit - why does the Open Source work less well for the artistic side? Is it because with source, I can actually reuse other peoples work, while with art I can't? Is it less of a give and take, in a way?

Robert Blum
Wednesday, March 19, 2003

Rob: I can't offer great insights, but I can offer my own experiences: My programs have bad UI (if I write more than a library...), and that's because they weren't designed to be great programs (I have one in the pipeline that *is*, and will have a good UI, but the others...), they were designed to get a job done.

It comes down to this: I don't like writing GUI code. I've gotten pretty good at writing console and CLI apps, and I can crank out one of those to do the job faster. And since I know how to use it (having written it), I don't need a fancy GUI.

Again, that's projects that I've written for myself and released: they are fundamentally different from projects that were designed to be released from the get-go, which would have a quality GUI.

This line of thinking probably does not explain why KDE has such a bad UI (Lot's of little things... tiny frustrations that add up, so I don't use it.). I can't think of any big principles that explain that.

Mike Swieton
Wednesday, March 19, 2003

Joel's had some interesting links on difficulties of OS projects with UI design.  See
  http://www.joelonsoftware.com/oldnews/pages/August2002.html

Also, see the referred blog
    http://mpt.phrasewise.com/2002/08/18#a319

I'm a big fan of using open source, but the hype obscures some common and fundamental problems.  Usability is number 1.  Lack of documentation is number 2.  Other difficulties included a fragmented design (caused by many different contributors without a coherent vision) and a tendency to replicate commercial software rather than truly innovating.

Before I get jumped on, I'm not saying all open source software is not usable or not innovative.  There's a pyramid.  There's a couple of truly amazing OS projects out there (Linux, Apache, and a couple others), and a fair number of OS apps that are amazing and also amazingly difficult to use.  (like Apache Tomcat).  But I find a large number of apps that have a lot of promise with incomplete functionality that ends up being very frustrating. 

There's nothing wrong with this mix, but I just don't believe people who tell me that it's a universal rule that commercial software practices create bad software while open source creates good software.

Will
Wednesday, March 19, 2003

One more point I forgot to mention, regarding the notion of a community of users all working on the code base.

From a community standpoint, not all OS projects are really open to casual users, even those who contribute code.  There's one dev library I use where every time I request a feature on the mailing list I'm told "If you want the feature, submit a patch."  But when I've submitted patches, they get ignored by the "comitters" who tend to only commit the patches useful for the projects they are working on.  (to become a committer, you must be an almost full-time developer on the project, it seems).

Again, this isn't true for all projects.  But the reality is more political than you'd expect from reading /. or watching "Revolution OS".

Will
Wednesday, March 19, 2003

Four quick points.

Unix has been around a long, long time. a lot longer than any version of Windows.

It is ture that for one good Open Source piece of software there are loads of  buggy badly designed failures, but exaclty the same is true of closed source software, except that much closed source software was never completed because the company went bankrupt.

The "can my grandmother install Linux" test is flawed because your grandmother courln't install Windows either. However the fact that people were fooled has imprioved Linux installation a lot.

One of the main problems of Linux is the driver problem. It is not only that manufacturers don't imake them, it is often that they won't release enough info for anybody else to either. This is not the fault of Linux. Windows would have problems with a lot of hardware if MS had to reverse engineer it before it could write the drivers.

Anyway I'll be wiping out the old Madrake 7.0 installation and putting on the new one on the spare HD in the next couple of days, so I should be able to report how much ease of installation has improved in the last two and a half years.

Stephen Jones
Wednesday, March 19, 2003

It is obvious to me why open source software is so good: in almost all cases the customer IS the developer so it's in his interest to make it as good as possible. The simple fact is that you're eating your own dogfood because you're hungry and you'd like it to be as tasty as possible!

Other things help too:

1) It's in the programmer/user's interest to fix bugs as quickly as possible. It's easy to do because you just upload a patch or new tarball -- no need to contact every customer. It is accepted that software has bugs -- there's no commercial embarassment to worry about (and consequent pressures to conceal the existence of bugs). Fixing bugs is seen as a good thing, not evidence of weakness. Many (non-developer) users are tech savvy and can contribute at least descriptive bug reports and often fixes. This offloads much of the bug-fixing workload from the developer.

2) Your work as an OS developer, the source code, is public and reflects on you. Pride encourages you to do things The Right Way rather than use some nasty hack.

3) OS software is open not only in source code but also in design. It's designed to be extended by others. There are no commercial pressures to corner part of the marker. File formats are open. Just about every project above a certain size is extensible (Apache modules, gkrellm plugins, dockapps, Perl modules, VIM scripting, etc.). This makes for clean, modular design and lots of features.

4) The developer is almost invariably working on the project out of love and this is reflected in the quality of the code. Sure, some very lucky developers are employed by RedHat/SUSE/whoever, but these people would be working on their projects anyway.

Open source software exists is to do a job well. Commercial software exists to make money. Quality is inherent in OS software, and merely a occasional lucky by-product of commercial software.

Tom Payne
Wednesday, March 19, 2003

The better question is, after a decade or two, how is it possible that user interfaces on *nix are still so outrageously horrible?

pb
Wednesday, March 19, 2003

pb, this is an age-old discussion. Two key points (there are others):

1) Confusion between easy-to-use and easy-to-learn. Command line Linux is hard to learn but easy to use. Windows is easy to learn but hard to use. Example: how do you rename all 1,000 files in the current directory to use only lower case letters? In bash (a Unix shell) it's "for x in *; do mv $x `echo $x | tr A-Z a-z`; done". How do you do it Windows? Give me an example of something that you believe to be easy in Windows but hard in Linux. Give me all the exact steps required in Windows and I'll respond with the Linux equivalent so you can judge.

2) Familiarity. I use Ion as my window manger which, by design, doesn't let windows overlap and can be entirely keyboard driven. I find it very easy to use (I've also configured it to use VIM-like keybindings which I'm very familiar with). I find Windows very hard to use because I spend much of the time moving windows out of the way and working through hundreds of menus and submenus whenever I want to do something. A skilled Windows probably doesn't have these problems, but it's just familiarity. People forget that they had to learn about icons, menus, drop down lists, where to find things in Control Panel, etc. etc. and label anything they're not familiar with (and unwilling to learn) as hard-to-use.

In general in Linux easy things are easy (once you've learned) and hard things are possible. In Windows easy things are easy (once you've learned) and hard things are impossible.

Tom Payne
Wednesday, March 19, 2003

Tom puts it nicely.

pb, what exactly do you not like anyway?

Nat Ersoz
Wednesday, March 19, 2003

Tom,

An important note is that shell scripting is just an application on top of the kernel. I can, in fact, do shell scripting on Windows using a number of different tools. I can run bash or csh through cygwin or I can run a javascript shell or a perl shell. Or I can use the Windows Scripting Host and write code in VB. Using any of these tools, it's relatively easy to rename my 1000 files, even in windows.

From my experience, I can find nearly any *nix tool ported to run on Windows. And, if I want, I can spend all damn day running a Windows command line, just like I could run a *nix command line.

But the opposite isn't true. There are applications written for Windows that don't exist, and have no equivalent, on *nix workstations. If I want to do page layout for a printed brochure, what software can I use on *nix? There is no Quark XPress equivalent. The Gimp is much less usable than Photoshop. And there is no equivalent that I know of for Illustrator or Flash.

For me, the choice of an OS is primarily based on availability of software. And I think Windows still wins in this camp.

(NOTE: I actually use Linux every day at work because my company has lots of custom tools and utilities that were written specifically to run on *nix. I'm the one person on our team who would prefer to use Windows, even though I crossed the 80% line of the *nix learning curve long ago.)

Benji Smith
Wednesday, March 19, 2003

Tal:  Yes, I know very well Mac OS X is based on BSD -- which is why the iBook I'm using is the first Apple computer I've owned in my life (after ten years of scoffing at Macs, mind you).  I need to learn *nix, and I also need to be able to use a laptop on a daily basis.  That's two birds with one OS.  OS X as "killer app"... maybe I should write to their marketing department.  ;>

Tom:  Using just Windows alone, I'll grant that your example (renaming all files to use only lowercase) would be rather difficult for most users to accomplish, but if you throw in VB/VBA, I can write a function in about 3 minutes to do exactly that.  It'll be about 25 lines of code as opposed to your one-liner, but it'll do the job.  Personally, I find VB both easy to learn and to use.  Windows... I agree, it *is* hard to use, but I've been at it for so long I've gotten really fast at it... so it really comes down to familiarity.  I'd have put up with the steep Linux learning curve if it had been possible to do the things I wanted to do (e.g., sharing files with Windows), but it didn't work at all.  The package, as a whole, was unable to meet my needs, so while parts of it may be the coolest thing since the discovery of fire (note vain attempt to return to original topic), it's going to be a few more years before I touch it again.

Sam Gray
Wednesday, March 19, 2003

Just for the record, stuff I really like:

KDE:
* Ctrl-F[1-4] - switch descktops quickly, perfect for multitarget developers
* KDE Term - Shift-Up/Down arrow, Shift PageUp/Down scrolls the terminal window (fine/coarse), no mouse required (not that mice are evil, just the key board is quicker, and mice tend to slip off the scroll bar when you're not concentrating on mouse position)

Unix:
* su - turn into administrator (or any other user) without a GUI logout/login.  Is it any wonder that all windows users have admin privs?  Always running as root!  What a huge hole.
* ssh w/X forwarding - very nice
* find/grep - no windows equivalent.
* dd - all that talk about Ghost?  built in.
* symbolic links *that work*
* all text file configuration - makes remote adminstration not only possible, but easy.
* Every admin function can be manipulated on the command line.  Scripting is both possible and encouraged.
* The huge array of utilities which are standard on Linux distros:
ethereal, tcpdump, gcc, ddd/gdb, tar, gzip, ... - all consistent and scriptable.

Mozilla:
* Fast rendering.
* No popups.
* (also available on windows)

Things not to like:
* copy/cut/paste is very inconsistent.
* lacks a decent email client (so far)

Nat Ersoz
Wednesday, March 19, 2003

Most open-source programmers are writing code primarily to please themselves, hackers like themselves, and possibly other people in their organization.  Therefore, if they're working on some application, there's not much pushing them to think about how non-hackers might perceive its interface, or how people can learn to use the application without having a colleague teach them.  Therefore, usability and documentation quality suffer.

(I'm typing this on a laptop running Debian GNU/Linux, and I receive my mail on an ancient 486 box running OpenBSD.  I love open-source software, but sometimes I am reminded of Jamie Zawinski's quip: "Linux is only free if your time has no value.")

Seth Gordon
Wednesday, March 19, 2003

Benji, you're right that the shell is just an app on Linux and that virtually identical software is available for Windows. But on Windows is not particularly useful. On Linux I can ssh to a box anywhere in the world and setup a printer or webserver or whatever, primarily because everything can be done from the command line or with a text editor. AFAIK you can't perform much using a command line on Windows.

You're right that there's very little/no application software like Quark XPress for Linux, but this is due to it not being commercially viable rather than any user interface issues. Linux is much better suited as a server/power user OS than for home and business use at the moment, although this will probably change slowly. It's not helped by open source being savvy computer people and more interested in serving files than word processing.

Sam, I'm sorry that you weren't able to get Samba working. It's a very widely used piece of software. I use it at home to share files with an XP box and at work as a domain controller/file server/print server, so there must have been something very weird about your setup that prevented it from working.

Tom Payne
Wednesday, March 19, 2003

Well if you think a piece of Linux sucks you have your work cut out for you - the code is there for you to fix/hack/whatever.

My own personal experiences with Linux are varied. I use SUSE at home and it's a love-hate relationship just like my windows boxes are.

Ian Stallings
Wednesday, March 19, 2003

Nat,
I know for a fact there is a Windows NT tool that  will work as a GREP that is part of the Windows command line toolset out of the box... Findstr and yes it will take a regular expressions. I can also script (using WMI interface) all of the admin functions I need with Windows Script Host (Ships with Win2k free down load for NT) and you can install command line tools for admin as will (on Win2K comes on the Installation disk but not installed). Most people don't need root access on Win 2k not even developers so saying all people have root is an extrem exageration.  The only utility that would be nice is su so, but I can force a progarm to log on as a different user through API calls (a pain but doable if I know the login).  As for most of the other utilities you can use cygwin, MSK toolkit,  MS Services for UNIX (which includes GCC in 3.x. ) and several other tool kits.  Yes I realize only cygwin is free, but I must cover all options.  Oh and I am sick and like the registry ( I can manipulate it with WMI and WSH ).

Compiling Mozilla leaves me cold, I wish I did not have to install cygwin on my machine to get it to compile ( I am certain with a few changes it could compile as is with cl.exe but I don't have the time to track all the changes needed for a 'pure' Windows build.

A Software Build Guy
Wednesday, March 19, 2003

Yep, it's true there's alot of crap-ware for GNU/Linux.  I'm hard-pressed to think of examples.  Ok, I can think of one easily, though I know it's going to anger many people:  FluxBox...I won't get into details, except to say that whoever created it must have had a 40" monitor, because it wastes screenspace (tabs and title bars?  why?).  I think alot of the defensive attitude in the GNU/Linux community is completely unnecessary and harmful.  Someone says, "this programs hard to use," and an expert says, "oh, no, it isn't...you just need to RTFM then you know how to modify /etc/dev/ps2/config to make it work right".  And then new users get that look of death on their faces.

What would be great on GNU/Linux is if we had some way for newbies to easily set up an account with restricted permissions on it to allow expert GNU/Linux users to solve the problem for newbies, while telling them what they're doing over IRC or something.  But covering up these problems or justifying them does not make them go away, nor make them not exist.  Advanced users will probably always do their configuration, installation, etc, through modifying text-files and use "emerge -p Xfree86" (on Gentoo) to see what will happen when they install a new package, rather than using graphical front-ends designed to make life easy for newbies.  Summarily, problems should not be brushed aside as being tolerable because the expert user can easily deal with them.

That aside, there's also alot of crap-ware in the proprietary world as well, and there's even a tendency to inadvertantly make bad software by good companies.  From a company's point of view, good software means software that makes them alot of money, which is not necessarily the same thing as the true definition of good software, software which allows the user to get his/her task done faster.  This is why you see products where beauty is emphasized over functionality (e.g., OSX, though it offers many good functionality features).

For anyone who may be having a difficult time finding good software in GNU/Linux, check out GNUstep apps by a google search:
http://www.google.com/search?as_q=GNUstep+applications&num=100&hl=en&ie=UTF-8&oe=UTF-8&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=lang_en&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=&safe=images

dh003i
Wednesday, March 19, 2003

BuildGuy,

So, explain to me how root != administrator on Win32 platforms?

Can a user with admin privs install a kernel mode device driver?  Even my lame (though once formidable) user knowldege on Win32 is pretty sure that this is so.

So, how does a Win32 user, temporarily promote themselves to admin, isntall a device driver, and get back to normal user priveledges?  Answer me this and I'll acutally use the knowledge, and keep my kids from installing the next virus/spyware.

Findstr, eh?

*Might* be something like find/grep.

Now do this: find all files from current dir which have user write permissions, and diff them against a control directory:

find . -type f -perm +u+w -exec diff {} control_dir/{} \;

Or, exit all files under a dir which are writeable, but not executables:

emacs `find . -type f -perm +u+w -not -perm +u+x`

Or any thing else - sed/awk if you like - underneath a directory structure.  We create field update packages using find  "all files after todays build which are different than yesterday's build and push them out".  Simple and fully automaitc update packages for servers and clients in the field and under test.

PS - I've never compile Mozilla on either Linux or Win32..

Nat Ersoz
Wednesday, March 19, 2003

whoops 'exit' should be 'edit'

Nat Ersoz
Wednesday, March 19, 2003

To run programs with admin privileges under NT, use the 'runas' command. In Windows XP, this is even available everywhere right in Explorer.

Frederik Slijkerman
Wednesday, March 19, 2003

Nat,
My goal was to be informative not to flame. I need to make my self clear:

* I stated that a SU like tool would be helpful in an NT/2000 environment, it does not exist and might be nice to go to Administrator priveges to  Install software. You would still need to reboot in the driver example (you
might be able to change drivers in UNIX with out a reboot but you can't do it on a windows box to my knowledge (a plus for *NIX). But if you control the source and know a user's name and password you can allow a program to run as if that person started it (This is the reason on Windows NT/2K boxs Services and some programs sometimes add users so they can start themselves as a known user.

* To know why I answered the way I did you have to know that I work on a Windows Server based software system and faced alot simular thing to you *NIX project ( personally the project I am on would have been MUCH better off using a *NIX, but the OS was a management decision).  I am a hugh believer in "know what you are working on". I made a study of the how and why of  the Windows command line and in some cases the API to get my job done.

* The two direct find statements exampled can be done in vbscript and Windows Script Host with Windows Management Instrumentation interface. Not pretty but
doable.

*Oddly enough the last one in the paragraph is easy with an xcopy switch (/d)

I meant no harm I was just saying most every thing on your list is doable in NT/2000 in some form progarmatically.

A Software Build Guy
Wednesday, March 19, 2003

Sorry, my bad.  Haven't had good concentration lately.  Thanks for the reply.  Gotta go..

Nat Ersoz
Wednesday, March 19, 2003

Software Build Guy,

the equivalent of su on W2K is the secondary logon service.
runas /user:mymachine\administrator cmd
gives you a command shell running under the local administrator account.
You can also start any program under another account by holding down shift and the right click on the .exe, which will give you the "run as" context menu option.
If you want to be prompted for the account to use every time you run a program, create a shortcut to it, and in the shortcut properties (right click-> properties->shortcut) select the "Run as different user" option.
This is also the way to run some programs that explicitely try to disable the "run as" context menu.
Best practice on W2K is to never logon as administrator or a member of the local administrators group, but to use the secondary logon service when you need the priveleges for a specific task.

Just me (Sir to you)
Thursday, March 20, 2003

Thank You Sir,
I sorta rembered that was an advertised feature, but I did not know how to do it ( I hang my head in shame ) So I did not mention it (I will rember it now Sir)

A Software Build Guy
Thursday, March 20, 2003

Okay the neurons responsible for spell check are off line.  The word is Remember.

A Software Build Guy
Thursday, March 20, 2003

>>
Now do this: find all files from current dir which have user write permissions, and diff them against a control directory:
<<

for /f %f in ('dir /b /a-r-d') do @diff "%f" "%CONTROL_DIR%\%f"

>>
Or, edit all files under a dir which are writeable, but not executables:
<<

for /f %f in ('dir /b /a-r-d') do @if not ".exe"=="%~xf" @notepad %f

SomeBody
Thursday, March 20, 2003

Damn - that's nice.

Is there a man page for that?  (In other words, how'd you know how to do that?)

Nat Ersoz
Thursday, March 20, 2003

The NT/2000/XP equivalent for man for commands seems to be 'help'.  Type 'help' at a command prompt for a list of commands.  Type 'help <command>' (ex. 'help for') for info on that specific command. 

I found out about this stuff by accidently stumbling upon the 'for' command one day.  They packed a lot of functionality into that command.

You might want to check out the book Windows NT Shell Scripting by Tim Hill.  It gives a good overview of the syntax and commands.

SomeBody
Thursday, March 20, 2003

My mental answer involed looking looking at ACLs (I FEEL REAL STUPID, now) I use FOR all the time (not that complicated thou).  I guess I was stuck on files and Users (the NT/2K) group.  Thank you for the lesson.

A Software Build Guy
Thursday, March 20, 2003

*  Recent Topics

*  Fog Creek Home