Linux-Misc Digest #645, Volume #25                Sat, 2 Sep 00 01:13:01 EDT

Contents:
  Re: Shared library and PIC (Kenny McCormack)
  Re: for in list     in bash ("Andrew N. McGuire ")
  Netscape 4.75 not reading localtime ("Clarence B. Johnson, Jr.")
  Re: How to exclude dirs from tar-backup? (John-Paul Stewart)
  Re: #@$%@#$% Linux modules...... (John-Paul Stewart)
  Re: Improve X performance, how? (John-Paul Stewart)
  Re: for in list     in bash ("Andrew N. McGuire ")
  Re: ls -lt can be misleading ("Andrew N. McGuire ")
  Re: i cant telnet myself anymore ("Andrew N. McGuire ")
  Re: Shared library and PIC ([EMAIL PROTECTED])
  Re: for in list     in bash (Erik Max Francis)
  Re: network connection speed command ("Chris")
  Re: Script Kiddies?
  Re: summarize disk usage ("Andrew N. McGuire ")

----------------------------------------------------------------------------

From: [EMAIL PROTECTED] (Kenny McCormack)
Crossposted-To: comp.unix.programmer,comp.unix.solaris
Subject: Re: Shared library and PIC
Date: 1 Sep 2000 21:33:39 -0500
Reply-To: [EMAIL PROTECTED]

In article <8opi8s$vb1$[EMAIL PROTECTED]>, Gabriel  <[EMAIL PROTECTED]> wrote:
>Hi,
>
>I have read almost everywhere that I _had_ to compile the
>objects with -fPIC in order to be able to create a shared library,
>or else I would run into all kind of bugs.
>I have also read that -fPIC is only an optimisation and is not
>required.
>As it is, I cannot really afford to lose a register (exb) as a lot
>of the code is in assembly, and would need a major rewrite,
>put aside the performance issue.
>Also, I've read that -fPIC hurts performances and I the
>application I'm working on is rather performance critical.

Based on things I've read in comp.unix.solaris (I note that you are using
Linux and this stuff may very well be platform specific, in which case, it
is off-topic in comp.unix.programmer (where I am, in fact, posting this)),
shared libs w/o -fPIC is entirely possible and supported.  The cost is
simply that at runtime, there will be separate copies of the used bits of
code in memory (I.e., each process gets its own copy) - but that, since it
is isn't PIC code, it will run faster.  So, if you a choice in the matter,
it is a simple size vs. speed tradeoff.

This agrees with my own experience - see below.

>From the ELF format description, it is said that without -fPIC
>the linker goes through a lot of relocations at run-time,
>which I suppose also hurts performances.
>I would greatly appreciate if someone could add some
>information on what I already know. Especially if it is indeed
>possible to compile without -fPIC and what are the major
>drawbacks.

My understanding is that overall non-PIC code should be faster.  YMMV.

>Also, I have to make this shared library from a set of statically
>linked libraries (and some shared libs).
>From what I've read on the net, the easiest solution is to extract
>the object files from the static libs and to link them again all at
>once in the shared library.

I have done this - I had a .a file and wanted to make a shared lib out
of it.   The way I did it was to take the .h file for the lib and
convert it to a .c file that referenced all the functions in the .a,
then I compiled that .c into a .so file (passing the name of the .a along on
the final link command line), and in so doing, it pulled in all the
routines from the .a into the .so.  It wasn't too difficult and it
seems to work fine.  This was on Solaris.

I am cross-posting to both Linux and Solaris groups, because I am interested
in what people from those groups can add to the discussion.  I am
interesting in this on both platforms myself.

------------------------------

Crossposted-To: comp.unix.shell
From: "Andrew N. McGuire " <[EMAIL PROTECTED]>
Subject: Re: for in list     in bash
Date: Fri, 1 Sep 2000 21:53:41 -0500

On Fri, 1 Sep 2000, Erik Max Francis quoth:

~~ Date: Fri, 01 Sep 2000 12:42:13 -0700
~~ From: Erik Max Francis <[EMAIL PROTECTED]>
~~ Newsgroups: comp.unix.shell, comp.os.linux.misc
~~ Subject: Re: for in list     in bash
~~ 
~~ Barry Margolin wrote:
~~ 
~~ > Didn't I say all that later in my message?  I was just addressing the
~~ > actual mistakes in the above paragraph, not the redundancies.
~~ 
~~ Except that your eventual solution was to send those globs to ls, which
~~ is totally redundant; the globs themselves are already sorted, so
~~ sending them to ls is unnecessary.

Actually the question is academic as it is EXTREMELY unecessary to
use a for loop and glob to list files, ls was built for that.

ls -C1 # Cause thats what it's for!

anm
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Andrew N. McGuire                                                      ~
~ [EMAIL PROTECTED]                                              ~
~ "Plan to throw one away; you will, anyhow." - Frederick P. Brooks, Jr. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


------------------------------

From: "Clarence B. Johnson, Jr." <[EMAIL PROTECTED]>
Subject: Netscape 4.75 not reading localtime
Date: Sat, 02 Sep 2000 03:13:08 GMT


 I'm running RedHat 5.2 and sendmail, nothing fancy, just standard stuff. I'm also 
using
fetchmail to pop mail to my localhost from comcast

I use netscape to pop mail from the local machine.

Just upgraded to netscape 4.75 and this version seems to ignore timezones.

unix date shows correctly

[boyd@CJ23509-A /etc]$ date
Fri Sep 01 23:09:46 EDT 2000   < -- this is the current local time as I post

but when a mail is received of generated by netscape 4.75 mail client it only shows
GMT.

email generated or received by elm on same machine shows good time stamps


Any ideas out there? Seems like maybe I need a variable set or exported somewhere that 
I
don't know about.

Please reply to newsgroup and by email

Thanks

 Clarence Johnson





------------------------------

From: John-Paul Stewart <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: How to exclude dirs from tar-backup?
Date: Sat, 02 Sep 2000 03:22:19 GMT

Diana Block wrote:
> =

> Hi all,
> i try to realize a backup-script, that mounts the hdds our win-clients =
via
> samba on the linux-backupserver and backup them.
> the problem is that eg i try to backup only the files on C:\ mounted to=

> /mnt/nt/C without all subdirs:
> tar cvfz /tmp/test.tgz --exclude=3D/mnt/nt/C/Eigene\
> Dateien/ --exclude=3D/mnt/nt/C/WINDOWS/ --exclude=3D/mnt/nt/C/Programme=
/ *
> it doesn=B4t work.
> can everybody tell me what i=B4m doing wrong?
> =

> thanks in advance for your help
> diana

Another option you might try is quoting the exclude.  For example
--exclude=3D"/mnt/nt/C/WINDOWS/*" will exclude everything under the
/mnt/nt/C/WINDOWS directory.  I've used this format both during backup an=
d
restore to exclude directories and their contents.  (BTW, using
--exclude/mnt/nt/C/WINDOWS/ will exclude that directory, but not its cont=
ents. =

At least that's what happens on my machine.)

HTH,

J-P Stewart



------------------------------

From: John-Paul Stewart <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: #@$%@#$% Linux modules......
Date: Sat, 02 Sep 2000 03:22:20 GMT

[EMAIL PROTECTED] wrote:
> 
> The ips driver is in the kernel not as a module.
> Nowhere in the startup file (rc.sysinit) there is a "Loading ips module"
> line.
 
I don't know which distro you're using, but some (notably Slackware) use
rc.modules to load modules (rather than rc.sysinit).  On other distros (like
Debian) I've found modules loaded from other scripts, too.  So I'd suggest
checking all of your rc.* files for the ips line.  It'll be in one of them.

HTH,

J-P Stewart



------------------------------

From: John-Paul Stewart <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Improve X performance, how?
Date: Sat, 02 Sep 2000 03:22:21 GMT

Matt O'Toole wrote:
> 
> I find myself using Linux more and more these days, and Windows less and
> less.  However, while Linux itself is very fast and efficient, X is not,
> compared to Windows or Mac GUIs.  What can I do to upgrade X' performance?
> Do I need a faster processor, or will a newer/faster video card help?  Right
> now I'm running original Pentiums in the 150-200 Mhz range.  I have enough
> system RAM.  Video cards are ATI Mach 64 with 2-4 MB, or similar.  Would
> better video cards help, or do I need faster CPUs?  BTW, this is for plain
> old 2D stuff, no 3D or games.
> 
> Matt O.

You say you have "enough system RAM."  How much is enough?  One of your other
posts says you've settled on KDE--that's a memory hog.  My machine is a 200MHz
Penitum Pro with a measly 2MB Number Nine graphics card.  KDE was slow with 32MB
of system RAM but runs quite nicely with 64MB.  If you've got less than that in
PCs, upgrade system RAM. Otherwise, I don't know what to suggest to help you.

J-P Stewart



------------------------------

Crossposted-To: comp.unix.shell
From: "Andrew N. McGuire " <[EMAIL PROTECTED]>
Subject: Re: for in list     in bash
Date: Fri, 1 Sep 2000 22:26:01 -0500

On Fri, 1 Sep 2000, Andrew N. McGuire  quoth:

~~ Date: Fri, 1 Sep 2000 21:53:41 -0500
~~ From: Andrew N. McGuire  <[EMAIL PROTECTED]>
~~ Newsgroups: comp.unix.shell, comp.os.linux.misc
~~ Subject: Re: for in list     in bash
~~ 
~~ On Fri, 1 Sep 2000, Erik Max Francis quoth:
~~ 
~~ ~~ Date: Fri, 01 Sep 2000 12:42:13 -0700
~~ ~~ From: Erik Max Francis <[EMAIL PROTECTED]>
~~ ~~ Newsgroups: comp.unix.shell, comp.os.linux.misc
~~ ~~ Subject: Re: for in list     in bash
[ snip ]

~~ Actually the question is academic as it is EXTREMELY unecessary to
~~ use a for loop and glob to list files, ls was built for that.
~~ 
~~ ls -C1 # Cause thats what it's for!

Doh! Welcome to the department of redundacy department!

ls -1 # Sorts automatically

anm
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Andrew N. McGuire                                                      ~
~ [EMAIL PROTECTED]                                              ~
~ "Plan to throw one away; you will, anyhow." - Frederick P. Brooks, Jr. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


------------------------------

From: "Andrew N. McGuire " <[EMAIL PROTECTED]>
Subject: Re: ls -lt can be misleading
Date: Fri, 1 Sep 2000 22:29:37 -0500

On Fri, 1 Sep 2000, Ramin Sina quoth:

~~ Date: Fri, 01 Sep 2000 14:55:53 -0400
~~ From: Ramin Sina <[EMAIL PROTECTED]>
~~ Newsgroups: comp.os.linux.misc
~~ Subject: ls -lt can be misleading
~~ 
~~ This must be a common question. I am sure I am using the wrong command.
~~ Iam wondering what is the correct way of doing this:
~~ 
~~ I have several versions of some directory  on my hard disk and
~~ periodically I add to, change, or update the files inside them. If an
~~ updated files is deep inside a directory/subdirectory/..., then the
~~ command "ls -lt" or even "ls -lct" on theTOP directory does not give the
~~ correct date. How can I make the updated time of all the subdirectories
~~ be reflected in the TOP directory?
~~ 
~~ I have deleted several directories which I had thought to be old and
~~ obsolete, but which had in fact new files burried deep inside them...

This is not misleading if you think about.  By your reasoning, anytime
ANY file on your system is changed, the times on '/' would have to
change as well.  If you want to force a change, use 'touch -r', but
really I think you should rethink your way of looking at the FS.

anm
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Andrew N. McGuire                                                      ~
~ [EMAIL PROTECTED]                                              ~
~ "Plan to throw one away; you will, anyhow." - Frederick P. Brooks, Jr. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


------------------------------

Crossposted-To: uk.comp.os.linux
From: "Andrew N. McGuire " <[EMAIL PROTECTED]>
Subject: Re: i cant telnet myself anymore
Date: Fri, 1 Sep 2000 22:35:20 -0500

On Thu, 31 Aug 2000, tolan quoth:

~~ Date: Thu, 31 Aug 2000 06:19:20 +0100
~~ From: tolan <[EMAIL PROTECTED]>
~~ Newsgroups: comp.os.linux.misc, uk.comp.os.linux
~~ Subject: i cant telnet myself anymore
~~ 
~~ I could yesterday, but ive been generally messing about with system
~~ setting and know i cant.  since login doesnt seems to work ive been
~~ using this to change user to do various things.  Any ideas as to what i
~~ might of done, how to get it back. 
~~ 
~~ (im using suse 6.4 and have been using yast, so i havent done anything
~~ to drastic, cant remember/find out what ive done though)
~~ thanks and, i know, im a dufus.

Check /etc/inetd.conf, is telnet commented out?  
If so uncomment it and 'kill -1 `cat /var/run/inetd.pid`'!

anm
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Andrew N. McGuire                                                      ~
~ [EMAIL PROTECTED]                                              ~
~ "Plan to throw one away; you will, anyhow." - Frederick P. Brooks, Jr. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: comp.unix.programmer,comp.unix.solaris
Subject: Re: Shared library and PIC
Date: Sat, 02 Sep 2000 03:31:25 GMT

In article <8opou3$m9b$[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> In article <8opi8s$vb1$[EMAIL PROTECTED]>, Gabriel  <ystel@my-
deja.com> wrote:
> >Hi,
> >
> >I have read almost everywhere that I _had_ to compile the
> >objects with -fPIC in order to be able to create a shared library,
> >or else I would run into all kind of bugs.
> >I have also read that -fPIC is only an optimisation and is not
> >required.
> >As it is, I cannot really afford to lose a register (exb) as a lot
> >of the code is in assembly, and would need a major rewrite,
> >put aside the performance issue.
> >Also, I've read that -fPIC hurts performances and I the
> >application I'm working on is rather performance critical.
>
> Based on things I've read in comp.unix.solaris (I note that you are
using
> Linux and this stuff may very well be platform specific, in which
case, it
> is off-topic in comp.unix.programmer (where I am, in fact, posting
this)),
> shared libs w/o -fPIC is entirely possible and supported.  The cost is
> simply that at runtime, there will be separate copies of the used
bits of
> code in memory (I.e., each process gets its own copy) - but that,
since it
> is isn't PIC code, it will run faster.  So, if you a choice in the
matter,
> it is a simple size vs. speed tradeoff.
>
> This agrees with my own experience - see below.
>
> >From the ELF format description, it is said that without -fPIC
> >the linker goes through a lot of relocations at run-time,
> >which I suppose also hurts performances.
> >I would greatly appreciate if someone could add some
> >information on what I already know. Especially if it is indeed
> >possible to compile without -fPIC and what are the major
> >drawbacks.
>
> My understanding is that overall non-PIC code should be faster.  YMMV.
This will be very negligible though, since the extra effort for PIC is
essentially an extra dereferencing through another set of tables ( PLT -
 Process linkage table and GOT Global offset table )

>
> >Also, I have to make this shared library from a set of statically
> >linked libraries (and some shared libs).
> >From what I've read on the net, the easiest solution is to extract
> >the object files from the static libs and to link them again all at
> >once in the shared library.
>
> I have done this - I had a .a file and wanted to make a shared lib out
> of it.   The way I did it was to take the .h file for the lib and
> convert it to a .c file that referenced all the functions in the .a,
> then I compiled that .c into a .so file (passing the name of the .a
along on
> the final link command line), and in so doing, it pulled in all the
> routines from the .a into the .so.  It wasn't too difficult and it
> seems to work fine.  This was on Solaris.
make sure you define -z defs for ld ( resolve all symbols completely )
otherwise you might still have undefined symbols in the resultant .so.
A little more difficult method is to use a mapfile or -u switch to get
the symbols undefined, that will result in their extraction from the .a
file.
>
> I am cross-posting to both Linux and Solaris groups, because I am
interested
> in what people from those groups can add to the discussion.  I am
> interesting in this on both platforms myself.
>


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Erik Max Francis <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.shell
Subject: Re: for in list     in bash
Date: Fri, 01 Sep 2000 20:45:39 -0700

"Andrew N. McGuire" wrote:

> Actually the question is academic as it is EXTREMELY unecessary to
> use a for loop and glob to list files, ls was built for that.
> 
> ls -C1 [corrected to -1 in a later post] # Cause thats what it's for!

But the original poster didn't want a simple listing, he wanted to
iterate through the files contained in a glob.

-- 
 Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ A wise man never loses anything if he have himself.
\__/ Montaigne
    Kepler's laws / http://www.alcyone.com/max/physics/kepler/
 A proof of Kepler's laws.

------------------------------

From: "Chris" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux
Subject: Re: network connection speed command
Date: Sat, 2 Sep 2000 14:13:58 +1000

Er, ping perhaps?

Chris

Joseph Cooley <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello,
>
> I was wondering if anyone knows of a good command to find the speed at
> which a linux box is connected to the network. (i.e. 10 Mb/s or 100
> Mb/s, etc.)
>
> Thanks in advance,
> Joe
>
> --
> ____________________________________
> Joe Cooley
> [EMAIL PROTECTED]
> ____________________________________
>
>
>



------------------------------

From: [EMAIL PROTECTED] ()
Subject: Re: Script Kiddies?
Reply-To: [EMAIL PROTECTED]
Date: Sat, 02 Sep 2000 04:35:23 GMT

In article <[EMAIL PROTECTED]>, David Steuber wrote:
>Someone said:
>' It'll take script kiddies ages to to sort that out.
>
>What are script kiddies?  Are these people who write complex shell,
>Perl, Tcl, Python, etc programs and scripts, or are these people who
>are stuck in BASIC?  Or are these people who simply do not know C?
>
>I want to know!
>
>-- 
>David Steuber | "Are you now, or have you ever been, a member
>NRA Member    | of the NRA?" --- HUAC, 2004
>
>Happiness is a SAAB Gripen <http://www.gripen.saab.se/> in the
>garage, an FN-FAL in the safe, and an HK P7M8 on the hip.

http://rootprompt.org/article.php3?article=159

------------------------------

From: "Andrew N. McGuire " <[EMAIL PROTECTED]>
Subject: Re: summarize disk usage
Date: Fri, 1 Sep 2000 23:40:32 -0500

On 1 Sep 2000, Justin B Willoughby quoth:

~~ Date: 1 Sep 2000 23:26:32 GMT
~~ From: Justin B Willoughby <[EMAIL PROTECTED]>
~~ Newsgroups: comp.os.linux.misc
~~ Subject: Re: summarize disk usage
~~ 
~~ Arlan Lucas de Souza ([EMAIL PROTECTED]) writes:
~~ > Why I have two different results when I try summarize the disk usage of my
~~ > $HOME directory?
~~ > 
~~ > [arlan@alpha arlan]$ du -shc
~~ > 45M     .
~~ > 45M     total
~~ > 
~~ > [arlan@alpha arlan]$ du -shc *
~~ > 5.4M    Arquivos.PDF.PS
~~ > 153k    Barton
~~ > 4.6M    Bigelow
~~ > 17k     CodigoFonte
~~ > 126k    Dicas
~~ > 306k    GNUstep
~~ > 3.0k    Shell.Scripts
~~ > 3.8M    mail
~~ > 2.6M    office52
~~ > 11M     temp
~~ > 28M     total
~~ 
~~ Maybe the second one is not picking up hidden directories?? (directories
~~ that start with a .  (dot) )

[anm@hawk ~/test] perl -e 'print "\0" x 1024**2' > .file        [pts/2]
[anm@hawk ~/test] du -shc .                                     [pts/2]
1.0M
1.0M    total
[anm@hawk ~/test] du -shc *                                     [pts/2]
du: No match.
[anm@hawk ~/test] cp .file file                                 [pts/2]
[anm@hawk ~/test] du -shc *                                     [pts/2]
1.0M    file
1.0M    total

Looks like you are right!

anm
-- 
Andrew N. McGuire
[EMAIL PROTECTED]
perl -le'print map?"(.*)"?&&($_=$1)&&s](\w+)]\u$1]g&&$_=>`perldoc -qj`'


------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.misc) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Misc Digest
******************************

Reply via email to