Re: Limits of grep?

2000-09-27 Thread Omer Musaev



Shaul Karl wrote:

 Then xargs won't work either, will it?


xargs has flags -n , -l , -s to limit amount od args xargs execs each time.
Thus, having find . -name "*"  | xargs -n 500  , and assuming that find will return
654 file names, xargs will run _twice_, one time with 500 args, second time with 154

However, more elegant (IMHO) solution is not to use find and xargs at all, but
instead use :

ls  | while read file_name ; do grep pattern $filename ; done
(sh  syntax used )

 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word "unsubscribe" in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Limits of grep?

2000-09-27 Thread Nadav Har'El

On Wed, Sep 27, 2000, Omer Musaev wrote about "Re: Limits of grep?":
 xargs has flags -n , -l , -s to limit amount od args xargs execs each time.
 Thus, having find . -name "*"  | xargs -n 500  , and assuming that find will return
 654 file names, xargs will run _twice_, one time with 500 args, second time with 154
 
 However, more elegant (IMHO) solution is not to use find and xargs at all, but
 instead use :
 
 ls  | while read file_name ; do grep pattern $filename ; done
 (sh  syntax used )

Yes, but that will run the 'grep' program 654 times, compared to 2 times in
the xargs solution in your example! Forgetting for a moment the small difference
in grep output between one and many files, the problem with your last solution
is that it is much slower because the grep executable is loaded 654 times,
fork is done 654 times, share libraries are linked 654 times, and so on.
On todays computers, with fast CPUs, disks, in-memory disk cache, and fast
fork, this is not bad (but still not good!), but in the good-old-days, the
xargs solution would be significantly more efficient.

So if you need a quick-and-dirty script, use a loop like Omer suggested (but
it contains a small typo - fix it first!) - it's more flexible and general.
But if efficiency is important, the xargs solution wins. If you're looking
for less typing, the xargs solution is shorter too :)

-- 
Nadav Har'El| Wednesday, Sep 27 2000, 27 Elul 5760
[EMAIL PROTECTED] |-
Phone: +972-53-245868, ICQ 13349191 |I want to be a human being, not a human
http://nadav.harel.org.il   |doing -- Scatman John

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Limits of grep?

2000-09-27 Thread Tzafrir Cohen

On Wed, 27 Sep 2000, Omer Musaev wrote:

 
 
 Shaul Karl wrote:
 
  Then xargs won't work either, will it?
 
 
 xargs has flags -n , -l , -s to limit amount od args xargs execs each time.
 Thus, having find . -name "*"| xargs -n 500  , and assuming that find will return
 654 file names, xargs will run _twice_, one time with 500 args, second time with 154
 
 However, more elegant (IMHO) solution is not to use find and xargs at all, but
 instead use :
 
 ls| while read file_name ; do grep pattern $filename ; done
 (shsyntax used )

Which is equivalent to:

find . -maxdepth 1 -exec grep pattern {} \;

similar to what Shachar has sugested in the first place

-- 
Tzafrir Cohen
mailto:[EMAIL PROTECTED]
http://www.technion.ac.il/~tzafrir



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: REDHAT 7

2000-09-27 Thread Shapira Home Mail

yep,  it's a booting problem. Trouble is, i don't have a boot diskkete, and
wouldn't know what to do even if i had one
see the problem???

MS



 On Tue, 26 Sep 2000, Shapira Home Mail wrote:

  Having trouble with my redhat 6.2 (after upgrading my windows to ME).
  Is it a good idea to install redhat 7??

 a better idea would be to try solving your problem - it is most likely
 just a booting problem, and this could occure every tme you install
 another OS on your machine - e.g. when you re-install windows ME after it
 gets trashed for the first time ;)

  is it avalible for download on israeli ftps??

 look at www.linux.org.il - there is a post there about RH 7.0's
 availability. prepare a high-bandwidth connection, or a very very very
 long download time, to down the disk image(s?).

 guy

 "For world domination - press 1,
  or dial 0, and please hold, for the creator." -- nob o. dy


 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word "unsubscribe" in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: problem with HP-C1537A tape drive(DDS2,DDs3)

2000-09-27 Thread Boaz Rymland

I hope It'll help:

try setting the -B option for the dump command. from dump's man page:
-
-B records
 The number of 1 KB blocks per volume.  This option overrides the
 calculation of tape size based on length and density.
---

In other words, you tell dump how long your tape is. So if you enter -B 
you tell dump that it has *very* big (obviously not possible) tape media. Then
its up to you to calcualte the backup needs with regard to tape volume needed. 
This causes dump to stop from telling you "The tape media is full - please
replace..."

I use this in my work. ( I think this is what is quoted below)

Boaz.

avishaya wrote:
 
 Hi,
 I have tried to backup with dump to a tape drive model
 HP-C1537A(dds2,dds3)
 on  (symbios scsi  - ncr53c8xx) on linux box(version 6 - kernel
 2.2.12-20).
 Yes, the OS recognize the tape and load the "st" module(scsi id 2).
 
 when i type : mt -f /dev/nst0 stat (ofcourse when i put DDS3 media)
 
 SCSI 2 tape drive:
 File number=1, block number=0, partition=0.
 Tape block size 0 bytes. Density code 0x25 (DDS-3).
 Soft error count since last status=0
 General status bits on (8101):
 EOF ONLINE IM_REP_EN
 
 when i want to "dump" even the smallest partition( /boot - 20MB)
 
 dumping /dev/sda5
   DUMP: Date of this level 0 dump: Sun Sep 17 15:21:57 2000
   DUMP: Date of last level 0 dump: the epoch
   DUMP: Dumping /dev/sda5 (/home) to /dev/nst0
   DUMP: mapping (Pass I) [regular files]
   DUMP: mapping (Pass II) [directories]
   DUMP: estimated 5897597 tape blocks on 1.44 tape(s).
   DUMP: Volume 1 started at: Sun Sep 17 15:22:06 2000
   DUMP: End of tape detected
   DUMP: Closing /dev/nst0
   DUMP: Volume 1 completed at: Sun Sep 17 15:22:29 2000
   DUMP: Volume 1 took 0:00:23
   DUMP: Volume 1 transfer rate: 2 KB/s
   DUMP: Change Volumes: Mount volume #2
   DUMP: Is the new volume mounted and ready to go?: ("yes" or "no")
 DUMP: "Yes" or "No"?
 
 Don`t be mistake of the size of  the partition above.it occures on every
 single partition i want to dump
 this is only the log of my backup script which begins to dump firstly
 the most important data(/home)
 but even , if i try manually to dump the /boot partition (or /opt), i
 can`t.
 
 When i "tail" the /var/log/messages , this is what i get:
 
 Sep 17 13:28:48 localhost kernel: st0: Error with sense data: [valid=0]
 Info fld=0x0, Current st09:00: sense key Aborted Command
 Sep 17 13:28:48 localhost kernel: Additional sense indicates Data phase
 error
 
 Now, i know that it`s not an hardware prbolem(to be sure, i configured
 it on ULTRA SPARC station -
solaris 2.6 + windows nt workstation and it workes without any
 problem.
 I also use new media.
 sure , i used an old Dynatek tape before and it worked fine , untill it
 died.
 And yes i tried to play with dump arguments( dump 0usf 410 .)
 and yes i "played" with mt options. but without any luck
 
 Any ideas
 
 Thanks
 Avishay
 
 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word "unsubscribe" in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




MadDog meeting postponed to 21:00

2000-09-27 Thread Ury Segal

Hi

Ira asked me to informed you that
The MadDog Meeting was postponed to 21:00.

--ury


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: RFC: How do I set my time-zone data?

2000-09-27 Thread Shaul Karl

 Hi
 
 I felt this was missing in the FAQ, but I really didn't feel like reading
 too many docs, so I wrote:
 http://www.iglu.org.il/faq/cache/116.html
 
 The information there is a bit partial, and maybe slightly
 incorrect. Anybody wishes to correct this?
 
 And while we're at it:
 Anybody bothers updating the source zoneinfo from libc (At least on my
 Mandrake it is part of the glibc package)? 
 I recently upgraded to glibc 2.1.3 and the new Israel zoneinfo was not
 included, although they are at least half a year old.
 


Wasn't glibc 2.1.3 released at end of Feb?


 A small note about the instructions in
 ftp://ftp.cs.huji.ac.il/pub/tz/israel/linux/INSTALL (the redhat section):
 why not use:
 timeconfig Asia/Jerusalem 
 instead of step 7?
 


As far as I am aware of, the utility for time configuration is distro 
dependent:
[16:46:39 /tmp]$ locate timeconfig
[16:53:44 /tmp]$ locate tzconfig 
/usr/sbin/tzconfig
/usr/share/man/man1/tzconfig.1.gz
[16:53:54 /tmp]$ 


 regards
 
 -- 
 Tzafrir Cohen
 mailto:[EMAIL PROTECTED]
 http://www.technion.ac.il/~tzafrir
 
 
 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word "unsubscribe" in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]
 

-- 

Shaul Karl [EMAIL PROTECTED]
Donate free food to the world's hungry: see http://www.thehungersite.com



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




ISDN connection to bezeqint: a short list of phone numbers to dial.

2000-09-27 Thread Shaul Karl

Just in case someone else will try to use bezeqint services.
I have an ISDN connection to the Internet and am located in central Tel-Aviv.
The short summary of my ISDN connection problem to bezeqint is as follows:

I have tried the following phone numbers:
1) 640 - Do not use it. It does not gives the expected bandwidth of an 
ISDN line. This conclusion is backed up by another member of this list + 
bezeqint support.
2) 136014 - This seems to get me to 927. The bandwidth is as expected. 
However the connection is disconnected after 15min of inactivity. bezeqint 
support team says they are not responsible (they claim it is the line or Bezeq 
fault).
3) 725 - the one to use. 
-- 

Shaul Karl [EMAIL PROTECTED]
Donate free food to the world's hungry: see http://www.thehungersite.com



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ISDN connection to bezeqint: a short list of phone numbers to dial.

2000-09-27 Thread Hetz Ben Hamo

Shaul - I use 136373 number - and as far as I know it supports the 128k very
well - and it's included in the "hodshi hofshi" program for fixed payment.

Hetz

Shaul Karl wrote:
 
 Just in case someone else will try to use bezeqint services.
 I have an ISDN connection to the Internet and am located in central Tel-Aviv.
 The short summary of my ISDN connection problem to bezeqint is as follows:
 
 I have tried the following phone numbers:
 1) 640 - Do not use it. It does not gives the expected bandwidth of an
 ISDN line. This conclusion is backed up by another member of this list +
 bezeqint support.
 2) 136014 - This seems to get me to 927. The bandwidth is as expected.
 However the connection is disconnected after 15min of inactivity. bezeqint
 support team says they are not responsible (they claim it is the line or Bezeq
 fault).
 3) 725 - the one to use.
 --
 
 Shaul Karl [EMAIL PROTECTED]
 Donate free food to the world's hungry: see http://www.thehungersite.com
 
 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word "unsubscribe" in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: REDHAT 7

2000-09-27 Thread guy keren


On Wed, 27 Sep 2000, Shapira Home Mail wrote:

 yep,  it's a booting problem. Trouble is, i don't have a boot diskkete, and
 wouldn't know what to do even if i had one
 see the problem???

yes. the problem is that this problem is bound to occur to you again in
the future - will you want to re-install linux everytime it happens,
instead of learning once how to solve it properly? i'm not writing this to
annoy you - i'm writing this cause i had this problem more then once, and
many other users on this list also encounter this problem occasionaly, and
thus there are solutions to this problem that are easier to employ then a
full re-install. 

the basic idea is to boot your system from a floppy (or a rescue CD - for
example, if you have the red-hat 6.2 instal CD, you may boot your PC off
of t, and when it gives you te first prompt, type 'linux recue'). if you
don't posess a rescue disk, you may download one off the network. a good
one is tom's boot-root kit, but there are many others as well - make a
search for 'linux rescue floppy' in some search engine and you'll find
one.

after booting with the rescue disk, you need to mount the root partition
of your linux instalation, and run lilo, telling lilo where your
configuratin file is using its '-C' command line option.

it'll take some time getting this done the first time. when you succeed,
write down the procedure, so the next time that windows will wipe lilo off
your system - you'll know what to do.

guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]