Command Line Goodness or I Love Linux So Hard
One of the reasons I love Linux so much (and specifically using the terminal) is how robust and diverse it is. For instance, today I saw a person asking about how to go about building a perl script that threaded multiple rsync processes in order to transfer a large amount of data from one computer to another. One of the replies layed out a viable solution to the question asked, but also pointed out that you can do the same thing with one command:
ls | xargs -P20 -n1 -i rsync {} user@host:/tmp
Which will spawn 20 processes to copy everything in the current directory to a remote host. Simple, elegant, GENIUS.






