POV-Ray : Newsgroups : povray.macintosh : UNIX Ignorance : Re: UNIX Ignorance Server Time
25 Oct 2021 03:34:18 EDT (-0400)
  Re: UNIX Ignorance  
From: nemesis
Date: 29 Apr 2006 18:20:01
Message: <web.4453e578831086c7be77c3280@news.povray.org>
"Russell Towle" <rto### [at] inreachcom> wrote:
> What? What? A GUI is "punishment"? I will take a moment and grok that.

well, to me, most times it is a very limiting way to talk to computers.  but
that's just me and anyway, this was not what i said.

You said:
"UNIX POV works great on the Mac..."

and then:
"It is not nearly as nice as the Mac GUI versions, Official or MegaPov."

which led me to conclude that even though not being "as nice as the GUI
version", you're still using it.  So you must be a gluton for punishment
indeed... ;)

> Hey I've been using a shell. But as I recall, when my geekiness reached a
> certain pinnacle, and I typed "ls" into the command line and pressed enter,
> I nver saw "usr".

ok, ls, if not given a directory as parameter, lists the content of the
"Current Working Directory", which is the directory you're at right now.
You can discover what it is -- generally your home folder -- by typing the
aptly named "pwd" command. :)

and please, remember that all folders in a Unix filesystem are "plugged in"
to the root folder, that is "/".  So, the full path to the "usr" directory
is "/usr".  Same for "/home/myself" etc.

So, to see the contents of the "usr" directory:
ls /usr

However, if you're just installing the software, i don't think seeing the
contents will be of much help:  are you thinking of manually copying the
executable files and libraries around?  This is a bad idea, let the
installer do that for you.  Are you compiling from source?  "make" will
build and "make install" will install everything...

> " But if it is preceded by a period, even "ls" would not
> show it, right?

No.  "ls -a" shows all, even hidden files.  It will not show, though,
content for which you have no privilege for viewing, although that's not a
problem for root/admin...

> OK, Nemesis, please clarify: is "usr" typically the name of this root
> folder, parent to all other directories?

i guess i've already clarified that. / is the root. /usr is the full path of
directory usr in directory /.  I think the difficulty here is that / when
used as the first character in a directory path, represents the root
folder, while anywhere else it is just a path separator. :P

Just to add something more to the confusion:  . represents the current
directory and .. represents its parent directory.  So, you can reference
directories *relativaly*, without specifying the full path, like this:
cd ../ -> goes up one directory
cd ../../ -> goes up two directory
ls ../../foo -> list contents of directory foo two directories upwards

For security reasons, by default, Unix does not search for executables or
libs in the current directory, represented by ".".  So, if you're currently
in your home folder, and you decided to place the povray executable there,
and you try to start it like "povray" and receives something like "command
not found", don't be alarmed.  It is there, but since Unix prevents you
from running programs which could be malicious code placed there, you must
reference it either by the full absolute path -- like "/home/myself/povray"
-- or relatively, like "./povray" which reads "run the povray executable in
the . (current) folder".

Also, generally the symbol "~" when the first in a directory path is
expanded to   your home directory, like "/home/myself".  So you could as
well reference it like "~/povray"...

well, explaining these Unix details for newbies is always fun. :)

> Well, in my ignorance, I have scouted around the internet, and I read one
> convincing piece which said basically, don't do anything as Root if you can
> avoid it. One could inadvertently do all kinds of terrible things.

well, sure.  As root, you are the master of your domain, you're God, you are
The One. :)

you can even mistakenly bring the whole system down by accidentely typing
"rm -f /" which will wipe out the whole filesystem.  Why?  Because you're
root and the Unix philosophy is such that when root says one thing, it is
law.  root is never wrong and may have reasons to wipe out the whole system
for no aparent reason.    So, the system will not ask you something like
"Are you sure of that?" like is so common in GUI apps.  That's why you
specified the "-f" (force) switch in the first place, isn't it? :)

Well, personally, i hope the real one God does not commit typos... :P


Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.