He didn't want all the complication of rsync, he just wanted something simple with a progress bar. Rsync isn't really that simple. Sure, he could of wrote a shell script on top of rsync, but he probably learned a lot more from this.
When I read the installation example, I see that you also need the python-progressbar library, which means it depends on Python. So I would say rsync is simpler.
I was thinking (and didn't convey in writing) more on the use side, not the install side. It just bugs me that everything someone gets some joy from trying has a first comment of "why?".
The "why" generally comes into play when you project it as a solution to an unsolved problem(or at least a problem which can't be easily solved). If you leave it as "because it's fun", I am fine with it. If you present it as "now you can have progress bars with cp", I will ask "why? I can already do that with rsync". That's not because I want to put down your work; that's just thinking out loud.
I have an honest question then, "What benefit does the why post have?". I can see it if you're trying to warn someone of something, but otherwise it just comes off wrong.
If you are going for a teaching moment, then saying "I wanted the same thing and I chose to solve it with rsync with the following alias / script" is better than telling someone they are just a waste of time.
Make what you will of it. I am more likely to phrase it as "Why? rsync works just fine" than ""I wanted the same thing and I chose to solve it with rsync with the following alias / script". FWIW, as far as being educational goes, your phrasing says the same thing with padding.
Also, "how" matters only when I have "why" answered. If it isn't mentioned on the project page, or I skim too fast to grasp it, "why" would be the first thing on my mind.
And therein lies the sickness that is affects HN sometimes. For a bunch of hackers there are some fairly closed off minds. I did think rsync could do this as well, but there are other ways to skin a cat, perhaps not all in the most efficient ways, but what's wrong with exploring doing it this way? As developers and hackers, aren't we supposed to explore and try stuff out? FWIW, I learned some new python odds and sods out of this, even if I don't use this.
> And therein lies the sickness that is affects HN sometimes.
Sickness? Really? Did you come up looking for a question for which you already had an answer, and finding none, just put words in my mouth, and responded to an argument I didn't make.
What part of "just for fun" is fine with me was difficult to comprehend?
For anyone curious as I was why the /dev/tcp/... redirection works, the Bash manual contains the following:
Bash handles several filenames specially when they are used in
redirections, as described in the following table:
/dev/fd/fd
If fd is a valid integer, file descriptor fd is
duplicated.
/dev/stdin
File descriptor 0 is duplicated.
/dev/stdout
File descriptor 1 is duplicated.
/dev/stderr
File descriptor 2 is duplicated.
/dev/tcp/host/port
If host is a valid hostname or Internet address,
and port is an integer port number or service
name, bash attempts to open a TCP connection to
the corresponding socket.
/dev/udp/host/port
If host is a valid hostname or Internet address,
and port is an integer port number or service
name, bash attempts to open a UDP connection to
the corresponding socket.
pv is a great tool and one of the first things I install on new machines. I hate having no idea how long an operation is going to take. For example, loading a SQL dump
38 comments
[ 6.6 ms ] story [ 81.6 ms ] threadIf you are going for a teaching moment, then saying "I wanted the same thing and I chose to solve it with rsync with the following alias / script" is better than telling someone they are just a waste of time.
Also, "how" matters only when I have "why" answered. If it isn't mentioned on the project page, or I skim too fast to grasp it, "why" would be the first thing on my mind.
Sickness? Really? Did you come up looking for a question for which you already had an answer, and finding none, just put words in my mouth, and responded to an argument I didn't make.
What part of "just for fun" is fine with me was difficult to comprehend?
1 - http://www.ivarch.com/programs/pv.shtml
mysqldump -u user dbname | pv | mysql -u user -h some_remote server dbname
pv foo.sql | mysql
Oh here it is http://beatex.org/web/advancedcopy.html
http://www.commandlinefu.com/commands/view/4553/copy-a-file-...
dd does not show a progress bar, unfortunately but it does report its progress.