[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Newbie comments & queries



> I thought that I had fixed up color on the ls command but it seems not.
> I am logged in as user not root
> 
> The mini Colour-ls HOWTO said to add certain lines into .bashrc - well 
> they were already there so I uncommented them.

Once you uncomment them you have to run the script again.  You can
run it by doing:

$ . ./.bashrc

or 

$ source ./.bashrc

Then the colouring should work in that shell.  Or you can log out
and log back in again and the colouring should work in new shells.
But I like the idea of testing the new .bashrc file before
logging out, so that if a serious mistake is made and the script
bombs, you can fix it before you log out.

If it still doesn't work, post the parts of your .bashrc
and .bash_profile (or /etc/login and /etc/bash.bashrc) files
that deal with coloring, and we'll try to help.

Also send the output of the command
$ echo $SHELL

> Still no go.  I noted 
> that the first lines of .bashrc were like
> 
> /.bashrc executed by bash(1) for non-login shells
> 
> Well, I have a login shell, right? And the color was not coming up, and 
> neither were the uncommented alias definitions in the .bashrc file 
> either.

... a new login shell, after the .bash_profile is changed.

> Further examination brought me to .bashrc_profile , the first lines of 
> which said that it was for log-in shells.  I also noted that it had a 
> line
> 
> Include .bashrc

Files get included from scripts with the source or dot commands
as above (the source command can be run from the command line
or in a script).

> which I assume will process .bashrc. If I uncomment this file will that 
> be fine? I suppose I should have saved it as .old and then gone ahead and 
> tried anyway.

Another good technique!

> Also, question of terminology.  Do I have a terminal?  I have a monitor 
> attached to my PC.  Is this a vt100 terminal in unix-speak?

It's not a vt100 terminal.  I'm not entirely sure, I think you
are working at the "console".  It _is_ a "terminal", just not
a vt100 terminal.

> With regard to seeing more of top, I suppose that i could see if the 
> monitor would show more lines, will investigate that.

The output of top changes every 10 seconds or so (configurable), if
you really want to pore over the output and ensure it adds up,
etc, you want ps.  You can pipe ps to the screen, or to a file:

$ ps aux > ps.file.txt

Then you can edit the file ps.file.txt, or cat it through less:

$ cat ps.file.txt | less

And examine the contents to your heart's content.

> Douglas Tophams book is showing signs of age, but has been some help.  
> The simple script file examples, one concerned with taking input at the 
> command line via read (a directory name) failed to work despite having 
> been written correctly and rendered executeable.  I will check it out 
> again however.  There are quite a lot of commands that have obviously 

There are different shells, which take commands in different
syntaxes.  Debian Linux uses the bash shell, the Born Again Shell.
Similar shells are:  sh, ksh (Korn Shell), Bourne shell.  All
these are derived from and mostly compatible with sh.

You want to try to make sure your book isn't using C-shell derived
syntax (actually quite likely).  The two are really not compatible.
C-shell derived shells are:
csh, tcsh, zsh? and others.

> been upgraded or done away with over the years. Calendar is nice, have 
> made up a file with all birthdays and local holidays in it.  Must run it 
> daily via cron perhaps.

Great stuff, glad you are productive with some things!  Makes
learning a lot more fun.

-- 
bjb@achilles.net
Consider registering as a bone marrow donor
http://www.bloodservices.ca/english/ubmdr



Reply to: