[NTLUG:Discuss] how do I get a list of files that are setread-only?
Steve Baker
sjbaker1 at airmail.net
Tue Feb 4 06:38:12 CST 2003
Dennis Myhand wrote:
> However, a shell script is still, in my mind,
> programming, and your averague luser wouldn't be able to do it.
When you get to people of that level, nothing short of a single
large button saying "Click Here to Do <whatever>" would be simple
enough. There are people like that - but they are not likely to
be doing things like comparing two directory tree's looking for
permission differences. They'll be surfing the web, word processing
and playing games.
So we are talking about people with enough knowledge/intelligence
to type shell commands - but people who aren't professional
programmers.
"Programming" by writing shell script isn't *generally* remotely
as difficult as writing (say) a Visual Basic program to do the
same thing.
You can find problems for which it's much easier to write a full
blown program - and then the level of difficulty in Linux and
Windoze is comparable.
In the case in point: finding files that are write-enabled in
one directory but not in another. This can be achieved with about
four lines of shell - no loops, no conditionals. If you want to
call that a 'script' - well, technically, it is. However it can
be typed in as it's executed - so the 'debugging' process is
minimal. That's a VERY different scale of difficulty than doing
the same thing in Windoze by writing VB programs inside a spreadsheet
program or something.
Yes, you *can* write shell scripts that are horribly complicated
and which are as hard - and probably a lot harder - than writing
a "program" to do the same thing. But there is a large class of
problems for which a three to five line "list of commands" simply
types into the shell interactively allows Linux to do a job that
would require a full-blown "program" on an off-the-shelf Windoze
box. Even if you fall back to using a DOS shell, there isn't the
hugely rich and well thought out set of shell commands that we are
blessed with to get you where you want to go.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net> WorkEmail: <sjbaker at link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
More information about the Discuss
mailing list