Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Gods of perl

by revdiablo (Prior)
on Nov 04, 2004 at 17:16 UTC ( [id://405224]=note: print w/replies, xml ) Need Help??


in reply to Re: Gods of perl
in thread Gods of perl

then she certainly forgot the -v switch.

I realize your reply was a joke, but the -v switch is not necessary. It only turns on verbose mode. In some cases, using -v is actually detrimental.

For example, when unpacking any modern Linux kernel, there are so many small files that it takes longer to print their name to the screen than it does to unpack them. Turning on -v causes it to take longer than it does otherwise.

Replies are listed 'Best First'.
Re^3: Gods of perl
by theorbtwo (Prior) on Nov 04, 2004 at 17:33 UTC

    Actually, even on very fast connections, the time to download dwarfs the time to decompress, untar, or print the names. The best way is tail -f -n+0 linux-n.n.n.tar.bz2|bzcat -vv|tar -xv.


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      This is truth. But most people would be amazed at the actual time verbose output can cost your program. Printing is very expensive, I remember when coding a big branch-and-bound project for the cap-mst problem in college, it was responsible for like 70-80% of the total running time, which was huge. And I just couldn't believe it. So I think most people (specially non-programmers) have no idea how expensive it can be, and I can tell you I rarely use -v, unless I need it.
      Since I run my own proxy at home, I can assume that most downloads live in the cache, so I just do:
      curl <URL> | tar -jx or wget -O - <URL> | tar -jx
      most of the time.
      -nuffin
      zz zZ Z Z #!perl
Re^3: Gods of perl
by gellyfish (Monsignor) on Nov 04, 2004 at 17:40 UTC

    Indeed. When the first Exabyte tape drives came out (like Hi-8 video tapes for those who don't remember,) it was recommended not to use -v on the particular platform I was using at the time because it caused some weird timing problem on the SCSI bus (probably due to a bug in the OS but that's another story.)

    /J\

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://405224]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-23 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found