<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>wget &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/wget/</link>
	<description>Feed of posts on WordPress.com tagged "wget"</description>
	<pubDate>Tue, 01 Dec 2009 00:46:35 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Πολλαπλό download αρχείων με το wget]]></title>
<link>http://ubuntugreek.wordpress.com/2009/11/22/%cf%80%ce%bf%ce%bb%ce%bb%ce%b1%cf%80%ce%bb%cf%8c-download-%ce%b1%cf%81%cf%87%ce%b5%ce%af%cf%89%ce%bd-%ce%bc%ce%b5-%cf%84%ce%bf-wget/</link>
<pubDate>Sun, 22 Nov 2009 10:27:40 +0000</pubDate>
<dc:creator>xqtr</dc:creator>
<guid>http://ubuntugreek.wordpress.com/2009/11/22/%cf%80%ce%bf%ce%bb%ce%bb%ce%b1%cf%80%ce%bb%cf%8c-download-%ce%b1%cf%81%cf%87%ce%b5%ce%af%cf%89%ce%bd-%ce%bc%ce%b5-%cf%84%ce%bf-wget/</guid>
<description><![CDATA[Αν θέλετε να κατεβάσετε πολλά αρχεία τα οποία μπορεί να έχετε βρεί σε μια ιστοσελίδα, μπορείτε να το]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="font-size:x-large;"><strong>Α</strong></span>ν θέλετε να κατεβάσετε πολλά αρχεία τα οποία μπορεί να έχετε βρεί σε μια ιστοσελίδα, μπορείτε να το κάνετε εύκολα με το wget. Ανοίξτε ένα αρχείο με το κειμενογράφο σας (gedit, nano, vi κτλ) και κάντε paste όλα τα links των αρχείων. Σώστε το πχ. σαν filenames.txt, από το τερματικό δώστε την εντολή:</p>
<p><code>wget -i filenames.txt</code></p>
<p>και το κατέβασμα των αρχείων θα αρχίσει. Μπορείτε επίσης να φτιάξετε κάποιο script, ώστε όταν τελειώσει το κατέβασμα.. πχ να κλείσει ο υπολογιστής.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Instalar paquetes desde GetDeb]]></title>
<link>http://mgsanchezs.wordpress.com/2009/11/18/instalar-paquetes-desde-getdeb/</link>
<pubDate>Thu, 19 Nov 2009 01:14:46 +0000</pubDate>
<dc:creator>MgsanchezS</dc:creator>
<guid>http://mgsanchezs.wordpress.com/2009/11/18/instalar-paquetes-desde-getdeb/</guid>
<description><![CDATA[Ahora en getdeb podemos instalar paquetes sin estar descargando y haciendo doble clic en el paquete,]]></description>
<content:encoded><![CDATA[Ahora en getdeb podemos instalar paquetes sin estar descargando y haciendo doble clic en el paquete,]]></content:encoded>
</item>
<item>
<title><![CDATA[Resume Incomplete Downloads]]></title>
<link>http://tiltdbastrd.wordpress.com/2009/11/16/resume-incomplete-downloads/</link>
<pubDate>Mon, 16 Nov 2009 18:55:25 +0000</pubDate>
<dc:creator>tiltdbastrd</dc:creator>
<guid>http://tiltdbastrd.wordpress.com/2009/11/16/resume-incomplete-downloads/</guid>
<description><![CDATA[I was downloading Ubuntu Studio the other day and being 1.4Gb I left it downloading while I went off]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I was downloading Ubuntu Studio the other day and being 1.4Gb I left it downloading while I went off for the day. However, when I returned I saw the download had stopped at 58%!</p>
<p>Not wanting to waste time, bandwidth and money downloading it again I did a little search and found out about &#8216;<span style="color:#0000ff;">wget</span>&#8216;. It contains a command to resume incomplete downloads. So I only had to open the terminal in the folder where the file is contained and enter the following &#8220;<span style="color:#0000ff;">wget -c http://cdimage.ubuntu.com/ubuntustudio/releases/9.10/release/ubuntustudio-9.10-alternate-i386.iso</span>&#8220;</p>
<p>The &#8216; <span style="color:#0000ff;">-c</span> &#8216; is the command used to continue a download and as long as you open the terminal from the folder containing the file, wget will continue the download from where it originally finished.</p>
<p>&#160;</p>
<div id="attachment_75" class="wp-caption aligncenter" style="width: 123px"><img class="size-full wp-image-75" title="tuxito" src="http://tiltdbastrd.wordpress.com/files/2009/11/tuxito.jpg" alt="el tux" width="113" height="124" /><p class="wp-caption-text">FOSS 4ever!</p></div>
<pre>The page I found this on is http://www.cyberciti.biz/tips/wget-resume-broken-download.html</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[http_proxy]]></title>
<link>http://linote.wordpress.com/2009/11/10/http_proxy/</link>
<pubDate>Tue, 10 Nov 2009 06:49:29 +0000</pubDate>
<dc:creator>Дмитрий Ершов</dc:creator>
<guid>http://linote.wordpress.com/2009/11/10/http_proxy/</guid>
<description><![CDATA[http_proxy="http://login:password@proxy:port/" Например, http_proxy="http://login:password@proxy:312]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><code>http_proxy="http://login:password@proxy:port/"</code><br />
Например,<br />
<code>http_proxy="http://login:password@proxy:3128/" wget "http://www.debian.org/"</code></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Optimizar Pacman]]></title>
<link>http://iyanmv.com/2009/11/05/optimizar-pacman/</link>
<pubDate>Thu, 05 Nov 2009 22:08:00 +0000</pubDate>
<dc:creator>iyanmv</dc:creator>
<guid>http://iyanmv.com/2009/11/05/optimizar-pacman/</guid>
<description><![CDATA[Aunque Pacman es un gran gestor de paquetes, siempre se pueden ajustar algunos detalles para que fun]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Aunque Pacman es un gran gestor de paquetes, siempre se pueden ajustar algunos detalles para que funcione más rápido</strong>. Por una parte podemos <strong>optimizar la base de datos</strong> para que el acceso a estos archivos sea más rápido, y por otra parte <strong>cambiar el gestor de descargas</strong> de pacman por otro para descargar los paquetes más rápidamente aprovechando, por ejemplo, las descargas simultáneas que permiten algunos.</p>
<p><!--more--></p>
<p>Para optimizar la base de datos existen varios scripts por internet, pero algunos de ellos pueden dañarla por lo que <strong>usaremos el oficial</strong>, que aunque no optimiza tanto como otros, es completamente seguro.</p>
<blockquote><p>pacman-optimize &#38;&#38; sync</p></blockquote>
<p>Ahora se nos presentan varias opciones, podemos instalar wget, aria2 o Powerpill. Escoged según vuestras preferencias. Por supuesto, también podéis dejar Pacman como esta. Este cambio es útil además de para ganar velocidad de descarga, para poder <strong>usar configuraciones avanzadas de proxy</strong>, las cuales pacman no soporta.</p>
<p>Para usar wget abrimos una terminal y escribimos.</p>
<blockquote><p>pacman -Sy wget</p></blockquote>
<p>Ahora modificamos el archivo <strong>/etc/pacman.conf</strong>, añadiendo la siguiente línea al final del apartado options.</p>
<blockquote><p>XferCommand = /usr/bin/wget -c &#8211;passive-ftp -c %u</p></blockquote>
<p>Suele venir comentada (#) en el archivo, asi que seguramente sólo haya que descomentarla.</p>
<p>Para usar Aria2 en primer lugar lo instalamos.</p>
<blockquote><p>pacman -Sy aria2</p></blockquote>
<p>Y ahora añadimos la siguiente al archivo de configuración de pacman.</p>
<blockquote><p>XferCommand = /usr/bin/aria2c &#8211;no-conf -s 2 -m 2 -d / -o %o %u</p></blockquote>
<p><strong>Powerpill es otra alternativa</strong>, pero en realidad no funciona como wget o aria2, funciona parecido a Yaourt. Una vez instalado tendremos que usar el comando powerpill para instalar los programas, con las mismas opciones que pacman. Por ejemplo, para actualizar el sistema, ejecutaríamos powerpill -Syu. Usando este programa si que notaremos mejoras significativas en el tiempo de descargas, ya que <strong>descarga varios paquetes de forma simultánea y usando diversos mirrors</strong>. Además usando Powerpill sólo se segmentarán los paquetes más grandes <strong>ahorrando el ancho de banda</strong> que se usa al segmentar paquetes pequeños.</p>
<p>Para instalar powerpill ejecutamos el siguiente comando.</p>
<blockquote><p>pacman -Sy powerpill</p></blockquote>
<p>Además de estos pequeños trucos para optimizar Pacman, <a href="http://wiki.archlinux.org/index.php/Improve_Pacman_Performance" target="_blank">encontraréis más en la wiki de Arch</a>, eso sí, en ingles <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Descargar sitios completos con wget]]></title>
<link>http://geniutrixone.wordpress.com/2009/11/05/descargar-sitios-completos-con-wget/</link>
<pubDate>Thu, 05 Nov 2009 13:27:03 +0000</pubDate>
<dc:creator>geniutrixone</dc:creator>
<guid>http://geniutrixone.wordpress.com/2009/11/05/descargar-sitios-completos-con-wget/</guid>
<description><![CDATA[Es sabido que si en consola tipeamos wget http://direccionweb.com/archivo.tar.gz se descargará en nu]]></description>
<content:encoded><![CDATA[Es sabido que si en consola tipeamos wget http://direccionweb.com/archivo.tar.gz se descargará en nu]]></content:encoded>
</item>
<item>
<title><![CDATA[Установка пакетов в случае с постоянно рвущимся соеднинением]]></title>
<link>http://padoctb.wordpress.com/2009/11/05/%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-%d0%bf%d0%b0%d0%ba%d0%b5%d1%82%d0%be%d0%b2-%d0%b2-%d1%81%d0%bb%d1%83%d1%87%d0%b0%d0%b5-%d1%81-%d0%bf%d0%be%d1%81%d1%82%d0%be%d1%8f%d0%bd%d0%bd/</link>
<pubDate>Thu, 05 Nov 2009 09:52:00 +0000</pubDate>
<dc:creator>padoctb</dc:creator>
<guid>http://padoctb.wordpress.com/2009/11/05/%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-%d0%bf%d0%b0%d0%ba%d0%b5%d1%82%d0%be%d0%b2-%d0%b2-%d1%81%d0%bb%d1%83%d1%87%d0%b0%d0%b5-%d1%81-%d0%bf%d0%be%d1%81%d1%82%d0%be%d1%8f%d0%bd%d0%bd/</guid>
<description><![CDATA[В GUI synaptic есть возможность сгенерировать скрипт загрузки выбранных пакетов с их последующей уст]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>В GUI synaptic есть возможность сгенерировать скрипт загрузки выбранных пакетов с их последующей установкой: &#8220;генерировать скрипт закачки пакетов&#8221; и &#8220;добавить закаченные пакеты&#8221;.<br />
В случае с CLI можно использовать опции &#8211;print-uris в apt-get и вместо установки будет выведен список адресов для загрузки выбранных пакетов с учетом зависимостей.
<p style="border:dashed 1px;background-color:#ddd;">apt-get -y &#8211;print-uris install список_пакетов</p>
<p>Список индексов:</p>
<p style="border:dashed 1px;background-color:#ddd;">apt-get &#8211;print-uris update</p>
<p>Эти пакеты можно загрузить отдельно и скопировать в /var/cache/apt/archives, например:<!--more--></p>
<p style="border:dashed 1px;background-color:#ddd;">apt-get -qq -y &#8211;print-uris upgrade &#124; cut -f1 -d&#8217; &#8216; &#124; tr -d &#8220;&#8216;&#8221; &#62; packet_list.txt<br />
cd /var/cache/apt/archives<br />
wget &#8211;input-file packet_list.txt</p>
<p>затем повторить команду &#8220;apt-get install список_пакетов&#8221;, пакеты будут установлены из кэша.<br />
Вместо /var/cache/apt/archives можно указать и другую директорию:
<p style="border:dashed 1px;background-color:#ddd;">apt-get -o dir::cache::archives=&#8221;/download&#8221; install список_пакетов</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Usando wget para descargar archivos y sitios de internet]]></title>
<link>http://todoymas.wordpress.com/2009/11/03/usando-wget-para-descargar-archivos-y-sitios-de-internet/</link>
<pubDate>Tue, 03 Nov 2009 07:25:11 +0000</pubDate>
<dc:creator>etnos</dc:creator>
<guid>http://todoymas.wordpress.com/2009/11/03/usando-wget-para-descargar-archivos-y-sitios-de-internet/</guid>
<description><![CDATA[Aprenderemos a bajarnos archivos y webs enteras usando wget en Linux. Todas las siguientes lineas de]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Aprenderemos a bajarnos archivos y webs enteras usando wget en Linux. Todas las siguientes lineas de código las tenemos que poner en la consola de Linux pero sustituir la web por la que queramos.</p>
<p style="text-align:justify;">Su uso básico es para bajarnos archivos así que pondremos:</p>
<blockquote><p>wget http://sitioweb.com/archivo.zip</p></blockquote>
<p style="text-align:justify;">De este modo nos bajaríamos el archivo.zip, pero podemos añadirle otros parámetros y usarlos de modo que nos ayuden a perfeccionar nuestra tarea.</p>
<p style="text-align:justify;">Si ahora ponemos:</p>
<blockquote><p>wget -r http://sitioweb.com</p></blockquote>
<p style="text-align:justify;">Con el parámetro <em>-r</em> le estaremos diciendo que baje<strong> recursivamente</strong> todos los archivos del sitio web, esto significa que nos bajará imágenes, archivos html, etc. Pero si lo usan de este modo seguro que el sitio les bloquea la ip debido a que estamos enviando demasiadas peticiones seguidas y descargando todo, para evitar esto podríamos usar algo asi:</p>
<blockquote><p>wget &#8211;random-wait &#8211;limit-rate=20k -r  http://sitioweb.com</p></blockquote>
<p style="text-align:justify;"><strong>&#8211;random-wait</strong> Hace que entre un archivo y otro espere un periodo de tiempo aleatorio. De este modo el sitio de donde estamos bajando los archivos no se dará cuenta de nada.</p>
<p style="text-align:justify;"><strong> &#8211;limit-rate=20k</strong> Lo que hace es limitar las descargas de los archivos a una transferencia máxima de 20k. Al igual que el parámetro anterior ayuda a evitar que nos baneen la IP mientras estamos bajando.</p>
<p style="text-align:justify;">Aunque aún le podemos añadir mas parámetros, por ejemplo algo así:</p>
<blockquote>
<p style="text-align:justify;">wget &#8211;wait=20 &#8211;limit-rate=20K -r -p -U Mozilla http://sitioweb.com</p>
</blockquote>
<p style="text-align:justify;"><strong>&#8211;wait=20</strong> Hace una pausa de 20 entre archivo y archivo pero creo que lo mejor seria usar random, &#8211;random-wait</p>
<p style="text-align:justify;"><strong> -p</strong> Indica que descargue los archivos para ser visualizados correctamente como html, con esto me refiero a que se baje las páginas para verlas en tu disco como si estuvieras navegando por internet</p>
<p style="text-align:justify;"><strong>-U mozilla</strong> Hará creer al sitio web que estamos usando algún navegador de la familia de Mozilla para hacer las descargas. Es decir como si estuviéramos navegando pro la web con Firefox.</p>
<p style="text-align:justify;">También podemos poner niveles para bajar la página como en este ejemplo:</p>
<blockquote><p>wget -r -l 4 http://sitioweb.com</p></blockquote>
<p style="text-align:justify;"><strong>-l 4</strong> Significa que solo nos bajaremos cuatro niveles des de esa web, debemos tener en cuenta que cuatro niveles puede ser bastante y que a cada nivel se aumenta exponencialmente la información descargada. Podemos sustituir el 4 por otro numero, el numero de niveles que deseemos descargar.</p>
<p style="text-align:justify;">Para descargar solo un tipo de archivo concreto podemos poner este código:</p>
<blockquote><p>wget -r -A=.jpg,.png http://sitioweb.com</p></blockquote>
<p style="text-align:justify;"><strong>A=.jpg,.png</strong> Con este parámetro nos bajaríamos los archivos .jpg y .png. Aunque podemos poner <em>A= #</em>, dónde # equivale a cualquier otro formato, puede ser que dependiendo del formato no nos encuentre ningún archivo. Si queremos poner múltiples formatos debemos separarlos con comas y sin espacios. El formato debe incluir punto.</p>
<p style="text-align:justify;">Espero que les aya servido, para cualquier cosa pueden dejar un comentario.</p>
<p style="text-align:justify;">
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[cli] Find out the public IP in the command line]]></title>
<link>http://nixtricks.wordpress.com/2009/10/30/cli-find-out-the-public-ip-in-the-command-line/</link>
<pubDate>Fri, 30 Oct 2009 19:33:17 +0000</pubDate>
<dc:creator>kousik</dc:creator>
<guid>http://nixtricks.wordpress.com/2009/10/30/cli-find-out-the-public-ip-in-the-command-line/</guid>
<description><![CDATA[You may find out your IP using commands like ifconfig, but if your computer is behind a firewall, th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>You may find out your IP using commands like <code>ifconfig</code>, but if your computer is behind a firewall, that is not the IP that the world sees. Here&#8217;s a quick <em>how-to</em> to find out what your external IP is.</p>
<p>First, let&#8217;s create an alias: (<a href="http://www.commandlinefu.com/commands/view/3943/what-is-my-ip">link</a>)</p>
<div style="border:1px dotted black;padding:1em;"><code>alias getip="wget -q -O - http://whatismyip.com/automation/n09230945.asp"</code></div>
<p>Next time when you need the public IP of your computer, just type <code>getip</code> in the command line and hit enter.</p>
<p>The above command gets the IP from http://whatismyip.com/automation/n09230945.asp (just copy and paste this URL to your location bar and hit enter, and see what it does!). The &#8220;<code>-q</code>&#8221; is to suppress verbose information (quiet mode) and &#8220;<code>-O -</code>&#8221; causes the output to be written to STDOUT.</p>
<p>You may use dyndns.org too to find out the IP, but in this case you may need some trimming: substitute the text within the code above by the following:</p>
<blockquote><p><code><br />
wget http://checkip.dyndns.org/ -O - -o /dev/null &#124; cut -d: -f 2 &#124; cut -d\&#60; -f 1</code></p></blockquote>
<p><strong><em>A few words about various flags above:</em></strong><br />
The output of the first command (everything before the first pipe) is</p>
<blockquote><p>&#60;code&#62;&#60;html&#62;&#60;head&#62;&#60;title&#62;Current IP Check&#60;/title&#62;&#60;/head&#62;&#60;body&#62;Current IP Address: xxx.xxx.xx.xx&#60;/body&#62;&#60;/html&#62;</p></blockquote>
<p>(the actual IP address is masked by x).<br />
The &#8220;<code>-o /dev/null</code>&#8220; part  redirects the STDERR of <code>wget</code> to <code>/dev/null</code>. The &#8220;<code>-d :</code>&#8221; option in first &#8220;cut&#8221; tells it to use colon (:) to be used as the delimiter and &#8220;<code>-f 2</code>&#8221; causes it to print second of the delimited fields. Similarly,  the flags of the second &#8220;cut&#8221; cause it to use &#8220;&#60;&#8221; as the delimiter for the piped output from the first &#8220;cut&#8221; and choose the first of the delimited fields.</p>
<p><strong>UPDATE:</strong> Another one using <code>curl</code> [<a href="http://www.commandlinefu.com/commands/view/3946/what-is-my-ip-hardened">link</a>]. You may again change the quoted text within the alias above by the following:</p>
<blockquote><p><code><br />
curl --connect-timeout 3 http://www.whatismyip.org/</code></p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[The Power of WGet Downloader]]></title>
<link>http://hensuu.wordpress.com/2009/10/27/the-power-of-wget-downloader/</link>
<pubDate>Tue, 27 Oct 2009 23:24:32 +0000</pubDate>
<dc:creator>supercode</dc:creator>
<guid>http://hensuu.wordpress.com/2009/10/27/the-power-of-wget-downloader/</guid>
<description><![CDATA[WGet utility is the best option to download files from internet. wget can pretty much handle all com]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>WGet</strong> utility is the best option to download files from internet. wget can pretty much handle all complex download situations including large file downloads, recursive downloads, non-interactive downloads, multiple file downloads etc., In this article let us review how to use <strong>WGet </strong>for various download scenarios using awesome wget examples :</p>
<h4>1. Download Single File with wget</h4>
<p>The following example downloads a single file from internet and stores in the current directory.</p>
<pre>$ wget http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2</pre>
<p>While downloading it will show a progress bar with the following information:</p>
<ul>
<li>%age of download completion (for e.g. 31% as shown below)</li>
<li>Total amount of bytes downloaded so far (for e.g. 1,213,592 bytes as shown below)</li>
<li>Current download speed (for e.g. 68.2K/s as shown below)</li>
<li>Remaining time to download (for e.g. eta 34 seconds as shown below)</li>
</ul>
<p>Download in progress:</p>
<pre>$ wget http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
Saving to: `strx25-0.9.2.1.tar.bz2.1'

31% [=================&#62; 1,213,592   68.2K/s  eta 34s</pre>
<p>Download completed:</p>
<pre>$ wget http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
Saving to: `strx25-0.9.2.1.tar.bz2'

100%[======================&#62;] 3,852,374   76.8K/s   in 55s    

2009-09-25 11:15:30 (68.7 KB/s) - `strx25-0.9.2.1.tar.bz2' saved [3852374/3852374]</pre>
<h4>2. Download and Store With a Different File name Using wget -O</h4>
<p>By default wget will pick the filename from the last word after last forward slash, which may not be appropriate always.</p>
<p><strong>Wrong:</strong> Following example will download and store the file with name: download_script.php?src_id=7701</p>
<pre>$ wget http://www.vim.org/scripts/download_script.php?src_id=7701</pre>
<p>Even though the downloaded file is in zip format, it will get stored in the file as shown below.</p>
<pre>$ ls
download_script.php?src_id=7701</pre>
<p><strong>Correct:</strong> To correct this issue, we can specify the output file name using the -O option as:</p>
<pre>$ wget -O taglist.zip http://www.vim.org/scripts/download_script.php?src_id=7701</pre>
<h4>3. Specify Download Speed / Download Rate Using wget –limit-rate</h4>
<p>While executing the wget, by default it will try to occupy full possible bandwidth. This might not be acceptable when you are downloading huge files on production servers. So, to avoid that we can limit the download speed using the –limit-rate as shown below.</p>
<p>In the following example, the download speed is limited to 200k</p>
<pre>$ wget --limit-rate=200k http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2</pre>
<h4>4. Continue the Incomplete Download Using wget -c</h4>
<p>Restart a download which got stopped in the middle using wget -c option as shown below.</p>
<pre>$ wget -c http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2</pre>
<p>This is very helpful when you have initiated a very big file download which got interrupted in the middle. Instead of starting the whole download again, you can start the download from where it got interrupted using option -c</p>
<p><strong>Note:</strong> If a download is stopped in middle, when you restart the download again without the option -c, wget will append .1 to the filename automatically as a file with the previous name already exist. If a file with .1 already exist, it will download the file with .2 at the end.</p>
<h4>5. Download in the Background Using wget -b</h4>
<p>For a huge download, put the download in background using wget option -b as shown below.</p>
<pre>$ wget -b http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
Continuing in background, pid 1984.
Output will be written to `wget-log'.</pre>
<p>It will initiate the download and gives back the shell prompt to you. You can always check the status of the download using tail -f as shown below.</p>
<pre>$ tail -f wget-log
Saving to: `strx25-0.9.2.1.tar.bz2.4'

     0K .......... .......... .......... .......... ..........  1% 65.5K 57s
    50K .......... .......... .......... .......... ..........  2% 85.9K 49s
   100K .......... .......... .......... .......... ..........  3% 83.3K 47s
   150K .......... .......... .......... .......... ..........  5% 86.6K 45s
   200K .......... .......... .......... .......... ..........  6% 33.9K 56s
   250K .......... .......... .......... .......... ..........  7%  182M 46s
   300K .......... .......... .......... .......... ..........  9% 57.9K 47s</pre>
<p>Also, make sure to review our previous <a href="http://www.thegeekstuff.com/2009/09/multitail-to-view-tail-f-output-of-multiple-log-files-in-one-terminal/">multitail article</a> on how to use tail command effectively to view multiple files.</p>
<h4>6. Mask User Agent and Display wget like Browser Using wget –user-agent</h4>
<p>Some websites can disallow you to download its page by identifying that the user agent is not a browser. So you can mask the user agent by using –user-agent options and show wget like a browser as shown below.</p>
<pre>$ wget --user-agent="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092416 Firefox/3.0.3" URL-TO-DOWNLOAD</pre>
<h4>7. Test Download URL Using wget –spider</h4>
<p>When you are going to do scheduled download, you should check whether download will happen fine or not at scheduled time. To do so, copy the line exactly from the schedule, and then add –spider option to check.</p>
<pre>$ wget --spider DOWNLOAD-URL</pre>
<p>If the URL given is correct, it will say</p>
<pre>$ wget --spider download-url
Spider mode enabled. Check if remote file exists.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
<strong>Remote file exists</strong> and could contain further links,
but recursion is disabled -- not retrieving.</pre>
<p>This ensures that the downloading will get success at the scheduled time. But when you had give a wrong URL, you will get the following error.</p>
<pre>$ wget --spider download-url
Spider mode enabled. Check if remote file exists.
HTTP request sent, awaiting response... 404 Not Found
<strong>Remote file does not exist -- broken link!!!</strong></pre>
<p>You can use the spider option under following scenarios:</p>
<ul>
<li>Check before scheduling a download.</li>
<li>Monitoring whether a website is available or not at certain intervals.</li>
<li>Check a list of pages from your bookmark, and find out which pages are still exists.</li>
</ul>
<h4>8. Increase Total Number of Retry Attempts Using wget –tries</h4>
<p>If the internet connection has problem, and if the download file is large there is a chance of failures in the download. By default wget retries 20 times to make the download successful.</p>
<p>If needed, you can increase retry attempts using –tries option as shown below.</p>
<pre>$ wget --tries=75 DOWNLOAD-URL</pre>
<h4>9. Download Multiple Files / URLs Using Wget -i</h4>
<p>First, store all the download files or URLs in a text file as:</p>
<pre>$ cat &#62; download-file-list.txt
URL1
URL2
URL3
URL4</pre>
<p>Next, give the download-file-list.txt as argument to wget using -i option as shown below.</p>
<pre>$ wget -i download-file-list.txt</pre>
<h4>10. Download a Full Website Using wget –mirror</h4>
<p>Following is the command line which you want to execute when you want to download a full website and made available for local viewing.</p>
<pre>$ wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL</pre>
<ul>
<li> –mirror : turn on options suitable for mirroring.</li>
<li> -p : download all files that are necessary to properly display a given HTML page.</li>
<li> –convert-links : after the download, convert the links in document for local viewing.</li>
<li> -P ./LOCAL-DIR : save all the files and directories to the specified directory.</li>
</ul>
<h4>11. Reject Certain File Types while Downloading Using wget –reject</h4>
<p>You have found a website which is useful, but don’t want to download the images you can specify the following.</p>
<pre>$ wget --reject=gif WEBSITE-TO-BE-DOWNLOADED</pre>
<h4>12. Log messages to a log file instead of stderr Using wget -o</h4>
<p>When you wanted the log to be redirected to a log file instead of the terminal.</p>
<pre>$ wget -o download.log DOWNLOAD-URL</pre>
<h4>13. Quit Downloading When it Exceeds Certain Size Using wget -Q</h4>
<p>When you want to stop download when it crosses 5 MB you can use the following wget command line.</p>
<pre>$ wget -Q5m -i FILE-WHICH-HAS-URLS</pre>
<p><strong>Note:</strong> This quota will not get effect when you do a download a single URL. That is irrespective of the quota size everything will get downloaded when you specify a single file. This quota is applicable only for recursive downloads.</p>
<h4>14. Download Only Certain File Types Using wget -r -A</h4>
<p>You can use this under following situations:</p>
<ul>
<li>Download all images from a website</li>
<li>Download all videos from a website</li>
<li>Download all PDF files from a website</li>
</ul>
<pre>$ wget -r -A.pdf http://url-to-webpage-with-pdfs/</pre>
<h4>15. FTP Download With wget</h4>
<p>You can use wget to perform FTP download as shown below.</p>
<p>Anonymous FTP download using Wget</p>
<pre>$ wget ftp-url</pre>
<p>FTP download using wget with username and password authentication.</p>
<pre>$ wget --ftp-user=USERNAME --ftp-password=PASSWORD DOWNLOAD-URL</pre>
<p>source: <a href="http://www.thegeekstuff.com/2009/09/the-ultimate-wget-download-guide-with-15-awesome-examples/">here</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[wget as a website downloader]]></title>
<link>http://pkazmierczak.wordpress.com/2009/10/25/454/</link>
<pubDate>Sun, 25 Oct 2009 11:21:00 +0000</pubDate>
<dc:creator>Piotr Kaźmierczak</dc:creator>
<guid>http://pkazmierczak.wordpress.com/2009/10/25/454/</guid>
<description><![CDATA[Ever had a feeling there&#8217;s a tool you were searching for a long time sitting right in front of]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ever had a feeling there&#8217;s a tool you were searching for a long time sitting right in front of you and you couldn&#8217;t see it? Well, that&#8217;s how my search for a program that could download complete www pages onto my hard drive ended: <code>wget -r --level=3</code>. And suddenly the current version of <a href="http://learnyouahaskell.com">learnyouahaskell.com</a> is on my drive. Neat!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Post su Twitter molto semplice]]></title>
<link>http://nicolacardinali.wordpress.com/2009/10/24/post-su-twitter-molto-semplice/</link>
<pubDate>Sat, 24 Oct 2009 13:17:00 +0000</pubDate>
<dc:creator>nicolacardinali</dc:creator>
<guid>http://nicolacardinali.wordpress.com/2009/10/24/post-su-twitter-molto-semplice/</guid>
<description><![CDATA[Twitter è un servizio fantastico anche se rimane un po&#8217; incompreso dai più. Servizi come Faceb]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="font-family:arial;">Twitter è un servizio fantastico anche se rimane un po&#8217; incompreso dai più. Servizi come Facebook la fanno da padrone e forse anche a ragione. Questo però non vuol dire che Twitter debba essere trascurato o abbandonato. Twitter non ha di certo tutte le capacità che invece ci offre facebook ma proprio per questo forse va apprezzato. Twitter fa solo una cosa e la fa molto bene: permette agli utenti di scrivere piccole frasi (twit). Non c&#8217;è altro, solo questo. Altri utenti possono a loro discrezione decidere se seguire i tuoi twit oppure no e tu puoi fare altrettanto con gli altri utenti.</span></p>
<p><span style="font-family:arial;">Per venire all&#8217;argomento del mio post, quello che mi ha sempre &#8220;infastidito&#8221; prima che trovassi la soluzione descritta qui, era che per aggiornare il mio status di twitter dovessi accedere via browser al sito oppure utilizzare programmi più o meno belli e più o meno completi. Quello che mi &#8220;infastidiva&#8221; era il fatto di rendere complessa una operazione che doveva fare una cosa molto semplice: l&#8217;aggiornamento dello status. Il mio obiettivo era avere uno strumento che mi permettesse di aggiornare lo status e nient&#8217;altro e di farlo nel modo più veloce possibile (per scrivere una frase di poche parole non devo aprire il browser ed effettuare l&#8217;accesso al sito altrimenti si perde il &#8220;gusto&#8221; del twit).</span></p>
<p><span style="font-family:arial;">Finalmente grazie a due siti web sono riuscito a raggiungere il mio obiettivo. I due siti sono </span><br /><span style="font-family:arial;">http://www.networkworld.com/columnists/2008/052108-gearhead.html</span></p>
<p><span style="font-family:arial;">http://phalacee.com/index.php?page=development&#38;section=app&#38;development=19</span></p>
<p><span style="font-family:arial;">Il primo mi serve per Ubuntu e il secondo per Windows XP.</span></p>
<p><span style="font-family:arial;">Il funzionamento di entrambi è molto semplice: creare un file che, ad esempio twitter, e metterlo in una cartella accessibile (sotto c:\windows o nella cartella dell&#8217;utente). All&#8217;interno del file ci sono alcune righe di codice. Per usarlo basta digitare nella finestra Esegui il comando: twitter &#8220;Nuovo status&#8221; e pensa a tutto lui.</span></p>
<p><span style="font-weight:bold;font-family:arial;">Parte tecnica Ubuntu</span><br /><span style="font-family:arial;">Apri la finestra del terminale. Nella tua cartella utente crea un file chiamato twitter col comando</span><br /><span style="font-family:arial;">pico twitter</span></p>
<p><span style="font-family:arial;">All&#8217;interno scrivi il seguente codice (con le dovute correzioni)</span><br /><span style="font-family:arial;">#!/bin/bash</span><br /><span style="font-family:arial;">curl -u nomeutente:password -d status=&#8221;$1&#8243;  http://twitter.com/statuses/update.xml &#62;/dev/null</span></p>
<p><span style="font-family:arial;">Salva il file con CTRL+O ed esci da pico con CTRL+X.</span><br /><span style="font-family:arial;">Dai i permessi di esecuzione al file appena creato con </span><br /><span style="font-family:arial;">chown u+rx twitter</p>
<p>Aggiornamento: nel caso in cui curl non sia installato di default nella tua distribuzione, installalo con sudo apt-get install curl</p>
<p>Per provare se funziona dai il comando</span><br /><span style="font-family:arial;">./twitter &#8220;scrivi quello che vuoi&#8221;</span><br /><span style="font-family:arial;">Funziona anche dalla finestra esegui in modalità grafica. Per aprirla premi ALT+F2.</span></p>
<p><span style="font-weight:bold;font-family:arial;">Parte tecnica Windows XP</span><br /><span style="font-family:arial;">Vai sul sito phalacee.com che ho scritto sopra e scarica twitter CLI. Segui le istruzioni scritte all&#8217;interno del file zip.</span><br /><span style="font-family:arial;">Per scrivere i twit basta aprire la finestra di Esegui di Windows (Windows+R) e scrivere ad esempio twitter &#8220;Hello World&#8221;.</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Manual wget]]></title>
<link>http://codigosdebian.wordpress.com/2009/10/11/manual-wget/</link>
<pubDate>Sun, 11 Oct 2009 17:05:59 +0000</pubDate>
<dc:creator>Jonathan Hernandez Hernandez</dc:creator>
<guid>http://codigosdebian.wordpress.com/2009/10/11/manual-wget/</guid>
<description><![CDATA[Introducción wget es un estupendo programa que permite automatizar procesos de descarga de un servid]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Introducción</p>
<p>wget es un estupendo programa que permite automatizar procesos de descarga de un servidor HTTP o FTP. Es de línea de comandos y esta pequeña página hace un repaso de las opciones más usuales.<!--more--></p>
<p>Una forma de generar esas opciones es con el Generador de líneas de comandos de wget escrito en Javascript.<br />
Opciones más comunes</p>
<p>Para ver las opciones del programa wget:</p>
<p>wget &#8211;help</p>
<p>Para mandar esas opciones a un fichero wget.txt:</p>
<p>wget &#8211;help &#62; wget.txt</p>
<p>Para ver las opciones de pantalla en pantalla:</p>
<p>wget &#8211;help &#124; more</p>
<p>Para descargar un fichero de la dirección http://www.playboy.com/virus.zip:</p>
<p>wget http://www.playboy.com/virus.zip</p>
<p>Para descargar un fichero de la dirección http://www.playboy.com/virus.zip, intentándolo un número indefinido de veces (-t 0), retomando la descarga en la próxima ejecución si se corta la conexión o se para el programa (-c), identificándose como un navegador web normal para evitar ser detectado por algunos servidores (-U &#8220;Mozilla&#8221;) y no identificándose como un robot para tener acceso completo a las páginas (-erobots=off):</p>
<p>wget -t 0 -c -U &#8220;Mozilla&#8221; -erobots=off http://www.playboy.com/virus.zip</p>
<p>Para descargar completamente una página (-r) y convertir los enlaces para verla localmente (-k):</p>
<p>wget -t 0 -c -U &#8220;Mozilla&#8221; -erobots=off -r -k http://xxx.unizar.es</p>
<p>Para descargar la lista de enlaces de un fichero urls.txt:</p>
<p>wget -i urls.txt</p>
<p>Para aceptar solamente los ficheros JPG y MPG (-A *.jpg,*.mpg):</p>
<p>wget -t 0 -c -U &#8220;Mozilla&#8221; -erobots=off -r -k -A *.jpg,*.mpg http://www.fotos_y_videos_guarros.es</p>
<p>Espero que esta lista de opciones algo depravadas dé una idea de las posibilidades.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[#1 - (s)Collegamenti]]></title>
<link>http://idl3.wordpress.com/2009/10/10/1-scollegamenti/</link>
<pubDate>Sat, 10 Oct 2009 07:28:06 +0000</pubDate>
<dc:creator>idl3</dc:creator>
<guid>http://idl3.wordpress.com/2009/10/10/1-scollegamenti/</guid>
<description><![CDATA[Controllare la posta in arrivo su GMail da riga di comando $ curl -u USERNAME --silent "https://mail]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Controllare la posta in arrivo su GMail da riga di comando</strong><br />
<code>$ curl -u USERNAME --silent "https://mail.google.com/mail/feed/atom" &#124; perl -ne 'print "\t" if //; print "$2\n" if /(.*)/;'</code><br />
<a href="http://linuxiana.blogspot.com/2009/10/controllare-la-posta-in-arrivo-su-gmail.html">Continua a leggere&#8230;</a></p>
<p><strong>Aggiungere sottotitoli ad un file video</strong><br />
<code>$ mencoder -ovc xvid -xvidencopts fixed_quant=3 -oac copy -sub filesottotitoli.srt -subfont-text-scale 4 -o filevideoconsottotitoli.avi filevideosenzasottotitoli.avi</code><br />
<a href="http://www.pietrodigiorgio.it/1075/sottotitoli-perfetti-con-mencoder/">Continua a leggere&#8230;</a></p>
<p><strong>wget + Google Image Ripper (script Bash)</strong><br />
Un grabber in bash che usa wget e GIR.<br />
<a href="http://niubbo.blogspot.com/2009/10/wget-google-image-ripper-script-bash.html">Continua a leggere&#8230;</a></p>
<p><strong>How to Set Up a High Performance Cluster (HPC) Using Debian Lenny and Kerrighed</strong><br />
Cluster controller or Head node: Debian Lenny or any other distribution. The single image passed on to the nodes will be Debian Lenny though.<br />
<a href="http://www.debianadmin.com/how-to-set-up-a-high-performance-cluster-hpc-using-debian-lenny-and-kerrighed.html">Continua a leggere&#8230;</a></p>
<p><strong>Make the Minimalist, Fading Google Homepage Your Default</strong></p>
<pre><tt>javascript<font color="#990000">:</font><font color="#009900">void</font><font color="#990000">(</font>document<font color="#990000">.</font>cookie<font color="#990000">=</font><font color="#FF0000">"PREF=ID=abac7a90f5a3784b:LD=en:NR=10:TM=1254990196:LM=1254990236:S=uB6F4jDnMP_DuxtT;path=/; domain=.google.com"</font><font color="#990000">);</font></tt></pre>
<p><a href="http://lifehacker.com/5377098/make-the-minimalist-fading-google-homepage-your-default">Continua a leggere&#8230;</a></p>
<hr />
<p style="text-align:right;"><a href="#content" title="torna su">[^] torna su</a>&#160;&#124;&#160;<a href="http://postli.com/post?u=http://idl3.wordpress.com/2009/10/10/1-scollegamenti/&#38;t=1 - (s)Collegamenti" title="Post to Postli" style="color:blue;text-decoration:none;">post<span style="color:orange;">&#60;</span><span style="color:red;">li</span><span style="color:orange;">&#62;</span></a>&#160;&#124;&#160;<a href="http://www.wikio.it/vote?url=http://idl3.wordpress.com/2009/10/10/1-scollegamenti/" target="_blank"><img src="http://www.wikio.it/shared/img/vote/wikio2.gif" border="0" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to get your external IP address using bash]]></title>
<link>http://homeilja.wordpress.com/2009/10/08/how-to-get-your-external-ip-address-using-bash/</link>
<pubDate>Thu, 08 Oct 2009 13:29:11 +0000</pubDate>
<dc:creator>ilja</dc:creator>
<guid>http://homeilja.wordpress.com/2009/10/08/how-to-get-your-external-ip-address-using-bash/</guid>
<description><![CDATA[If you are behind a router, ifconfig won&#8217;t give you your external IP address. As a possible so]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you are behind a router, <a title="ifconfig manpage" href="http://linux.die.net/man/8/ifconfig" target="_blank">ifconfig</a> won&#8217;t give you your external IP address. As a possible solution you can (w)get it from <a title="http://checkip.dyndns.org/" href="http://checkip.dyndns.org/" target="_blank">http://checkip.dyndns.org/</a> and grep your external IP from the html file:</p>
<pre class="brush: bash;"> wget http://checkip.dyndns.org/ -qO - &#124; grep -Eo '\&#60;[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\&#62;'
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Wget and https]]></title>
<link>http://finkers.wordpress.com/2009/10/06/wget-and-https/</link>
<pubDate>Tue, 06 Oct 2009 19:10:03 +0000</pubDate>
<dc:creator>monipol</dc:creator>
<guid>http://finkers.wordpress.com/2009/10/06/wget-and-https/</guid>
<description><![CDATA[GNU Wget is a popular file download program, being installed by default on many Linux distributions.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a title="GNU Wget" href="http://www.gnu.org/software/wget/">GNU Wget</a> is a popular file download program, being installed by default on many Linux distributions. Recent Mac OS versions don&#8217;t ship Wget, though – Apple ships <a title="cURL" href="http://curl.haxx.se">cURL</a> instead.</p>
<p>Fink provides a wget package that installs Wget. It includes SSL (https) support provided by Mac OS built-in OpenSSL.  There&#8217;s a problem with that, though: on Mac OS versions earlier than 10.6, Apple&#8217;s OpenSSL doesn&#8217;t use the trusted root certificates available on the system (the ones listed by Keychain.app), so it is not able to validate SSL certificates on its own. Note that OpenSSL itself (independently of being shipped with Mac OS) isn&#8217;t distributed with root certificates by default.</p>
<p>Because of this, on Mac OS versions earlier than 10.6 the command</p>
<pre>wget https://fedorahosted.org</pre>
<p>won&#8217;t work:</p>
<pre>ERROR: cannot verify fedorahosted.org's certificate,
issued by `/C=US/O=Equifax/OU=Equifax Secure
Certificate Authority':
Unable to locally verify the issuer's authority.
To connect to fedorahosted.org insecurely, use
`--no-check-certificate'.
Unable to establish SSL connection.</pre>
<p>There are a couple of options to circumvent this. As the error message says, it&#8217;s possible to use &#8211;no-check-certificate, which is insecure. Another option is &#8211;ca-certificate=file where file is a bundle of trusted certification authority certificates. Fink provides a package called ca-bundle that installs a convenient file containing a bundle of CA certificates commonly used by open source Web browsers. After running</p>
<pre>fink install ca-bundle</pre>
<p>you should be able to use /sw/etc/ssl/certs/ca-bundle.crt with Wget:</p>
<pre>wget --ca-certificate=/sw/etc/ssl/certs/ca-bundle.crt \
https://fedorahosted.org</pre>
<p>Fortunately, you may specify that option in one of <a title="Wget startup files" href="http://www.gnu.org/software/wget/manual/html_node/Startup-File.html">Wget&#8217;s startup files</a> (e.g. $HOME/.wgetrc or /sw/etc/wgetrc) by adding the following line to your startup file of choice:</p>
<pre>ca_certificate = /sw/etc/ssl/certs/ca-bundle.crt</pre>
<p>And voilà!, you may use wget as usual:</p>
<pre>wget https://fedorahosted.org</pre>
<p>This is particularly useful if you&#8217;re using Wget as your <a title="Fink User's Guide - Download Settings" href="http://www.finkproject.org/doc/users-guide/conf.php#downloading">DownloadMethod</a> and Fink needs to download a source file from an https URL.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux'ta komut bitince başka komut çalıştırma]]></title>
<link>http://prokaryot.wordpress.com/2009/10/05/linuxta-komut-sonrasi-komut/</link>
<pubDate>Mon, 05 Oct 2009 14:36:50 +0000</pubDate>
<dc:creator>prokaryot</dc:creator>
<guid>http://prokaryot.wordpress.com/2009/10/05/linuxta-komut-sonrasi-komut/</guid>
<description><![CDATA[Gece yatarken download yapmak heralde en sevdiğim şeylerdendir. Böylece sabah yapmam gereken işleri ]]></description>
<content:encoded><![CDATA[Gece yatarken download yapmak heralde en sevdiğim şeylerdendir. Böylece sabah yapmam gereken işleri ]]></content:encoded>
</item>
<item>
<title><![CDATA[The Ultimate Wget Download Guide With 15 Awesome Examples]]></title>
<link>http://pswebsolutions.wordpress.com/2009/10/05/the-ultimate-wget-download-guide-with-15-awesome-examples/</link>
<pubDate>Mon, 05 Oct 2009 02:18:38 +0000</pubDate>
<dc:creator>Pushkar</dc:creator>
<guid>http://pswebsolutions.wordpress.com/2009/10/05/the-ultimate-wget-download-guide-with-15-awesome-examples/</guid>
<description><![CDATA[wget utility is the best option to download files from internet. wget can pretty much handle all com]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="margin:0 0 1.571em;padding:0;"><strong>wget</strong> utility is the best option to download files from internet. wget can pretty much handle all complex download situations including large file downloads, recursive downloads, non-interactive downloads, multiple file downloads etc.,</p>
<p style="margin:0 0 1.571em;padding:0;">In this article let us review how to use <strong>wget</strong>for various download scenarios using 15 awesome wget examples.<a href="http://www.thegeekstuff.com/wp-content/uploads/2009/10/15-wget-examples-300x257.png"><img class="alignnone" title="1" src="http://www.thegeekstuff.com/wp-content/uploads/2009/10/15-wget-examples-300x257.png" alt="" width="300" height="257" /></a></p>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">1. Download Single File with wget</h3>
<p style="margin:0 0 1.571em;padding:0;">The following example downloads a single file from internet and stores in the current directory.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2</pre>
<p style="margin:0 0 1.571em;padding:0;">While downloading it will show a progress bar with the following information:</p>
<ul style="list-style-type:square;list-style-position:initial;list-style-image:initial;margin:0 0 1.571em 1.571em;padding:0;">
<li style="margin:0;padding:0;">%age of download completion (for e.g. 31% as shown below)</li>
<li style="margin:0;padding:0;">Total amount of bytes downloaded so far (for e.g. 1,213,592 bytes as shown below)</li>
<li style="margin:0;padding:0;">Current download speed (for e.g. 68.2K/s as shown below)</li>
<li style="margin:0;padding:0;">Remaining time to download (for e.g. eta 34 seconds as shown below)</li>
</ul>
<p style="margin:0 0 1.571em;padding:0;">Download in progress:</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
Saving to: `strx25-0.9.2.1.tar.bz2.1'

31% [=================&#62; 1,213,592   68.2K/s  eta 34s</pre>
<p style="margin:0 0 1.571em;padding:0;">Download completed:</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
Saving to: `strx25-0.9.2.1.tar.bz2'

100%[======================&#62;] 3,852,374   76.8K/s   in 55s    

2009-09-25 11:15:30 (68.7 KB/s) - `strx25-0.9.2.1.tar.bz2' saved [3852374/3852374]</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">2. Download and Store With a Different File name Using wget -O</h3>
<p style="margin:0 0 1.571em;padding:0;">By default wget will pick the filename from the last word after last forward slash, which may not be appropriate always.</p>
<p style="margin:0 0 1.571em;padding:0;"><strong>Wrong:</strong> Following example will download and store the file with name: download_script.php?src_id=7701</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget http://www.vim.org/scripts/download_script.php?src_id=7701</pre>
<p style="margin:0 0 1.571em;padding:0;">Even though the downloaded file is in zip format, it will get stored in the file as shown below.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ ls
download_script.php?src_id=7701</pre>
<p style="margin:0 0 1.571em;padding:0;"><strong>Correct:</strong> To correct this issue, we can specify the output file name using the -O option as:</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget -O taglist.zip http://www.vim.org/scripts/download_script.php?src_id=7701</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">3. Specify Download Speed / Download Rate Using wget –limit-rate</h3>
<p style="margin:0 0 1.571em;padding:0;">While executing the wget, by default it will try to occupy full possible bandwidth. This might not be acceptable when you are downloading huge files on production servers. So, to avoid that we can limit the download speed using the –limit-rate as shown below.</p>
<p style="margin:0 0 1.571em;padding:0;">In the following example, the download speed is limited to 200k</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --limit-rate=200k http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">4. Continue the Incomplete Download Using wget -c</h3>
<p style="margin:0 0 1.571em;padding:0;">Restart a download which got stopped in the middle using wget -c option as shown below.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget -c http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2</pre>
<p style="margin:0 0 1.571em;padding:0;">This is very helpful when you have initiated a very big file download which got interrupted in the middle. Instead of starting the whole download again, you can start the download from where it got interrupted using option -c</p>
<p style="margin:0 0 1.571em;padding:0;"><strong>Note:</strong> If a download is stopped in middle, when you restart the download again without the option -c, wget will append .1 to the filename automatically as a file with the previous name already exist. If a file with .1 already exist, it will download the file with .2 at the end.</p>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">5. Download in the Background Using wget -b</h3>
<p style="margin:0 0 1.571em;padding:0;">For a huge download, put the download in background using wget option -b as shown below.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget -b http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
Continuing in background, pid 1984.
Output will be written to `wget-log'.</pre>
<p style="margin:0 0 1.571em;padding:0;">It will initiate the download and gives back the shell prompt to you. You can always check the status of the download using tail -f as shown below.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ tail -f wget-log
Saving to: `strx25-0.9.2.1.tar.bz2.4'

     0K .......... .......... .......... .......... ..........  1% 65.5K 57s
    50K .......... .......... .......... .......... ..........  2% 85.9K 49s
   100K .......... .......... .......... .......... ..........  3% 83.3K 47s
   150K .......... .......... .......... .......... ..........  5% 86.6K 45s
   200K .......... .......... .......... .......... ..........  6% 33.9K 56s
   250K .......... .......... .......... .......... ..........  7%  182M 46s
   300K .......... .......... .......... .......... ..........  9% 57.9K 47s</pre>
<p style="margin:0 0 1.571em;padding:0;">Also, make sure to review our previous <a style="color:#2361a1;text-decoration:underline;margin:0;padding:0;" href="http://www.thegeekstuff.com/2009/09/multitail-to-view-tail-f-output-of-multiple-log-files-in-one-terminal/">multitail article</a> on how to use tail command effectively to view multiple files.</p>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">6. Mask User Agent and Display wget like Browser Using wget –user-agent</h3>
<p style="margin:0 0 1.571em;padding:0;">Some websites can disallow you to download its page by identifying that the user agent is not a browser. So you can mask the user agent by using –user-agent options and show wget like a browser as shown below.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --user-agent="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092416 Firefox/3.0.3" URL-TO-DOWNLOAD</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">7. Test Download URL Using wget –spider</h3>
<p style="margin:0 0 1.571em;padding:0;">When you are going to do scheduled download, you should check whether download will happen fine or not at scheduled time. To do so, copy the line exactly from the schedule, and then add –spider option to check.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --spider DOWNLOAD-URL</pre>
<p style="margin:0 0 1.571em;padding:0;">If the URL given is correct, it will say</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --spider download-url
Spider mode enabled. Check if remote file exists.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
<strong>Remote file exists</strong> and could contain further links,
but recursion is disabled -- not retrieving.</pre>
<p style="margin:0 0 1.571em;padding:0;">This ensures that the downloading will get success at the scheduled time. But when you had give a wrong URL, you will get the following error.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --spider download-url
Spider mode enabled. Check if remote file exists.
HTTP request sent, awaiting response... 404 Not Found
<strong>Remote file does not exist -- broken link!!!</strong></pre>
<p style="margin:0 0 1.571em;padding:0;">You can use the spider option under following scenarios:</p>
<ul style="list-style-type:square;list-style-position:initial;list-style-image:initial;margin:0 0 1.571em 1.571em;padding:0;">
<li style="margin:0;padding:0;">Check before scheduling a download.</li>
<li style="margin:0;padding:0;">Monitoring whether a website is available or not at certain intervals.</li>
<li style="margin:0;padding:0;">Check a list of pages from your bookmark, and find out which pages are still exists.</li>
</ul>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">8. Increase Total Number of Retry Attempts Using wget –tries</h3>
<p style="margin:0 0 1.571em;padding:0;">If the internet connection has problem, and if the download file is large there is a chance of failures in the download. By default wget retries 20 times to make the download successful.</p>
<p style="margin:0 0 1.571em;padding:0;">If needed, you can increase retry attempts using –tries option as shown below.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --tries=75 DOWNLOAD-URL</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">9. Download Multiple Files / URLs Using Wget -i</h3>
<p style="margin:0 0 1.571em;padding:0;">First, store all the download files or URLs in a text file as:</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ cat &#62; download-file-list.txt
URL1
URL2
URL3
URL4</pre>
<p style="margin:0 0 1.571em;padding:0;">Next, give the download-file-list.txt as argument to wget using -i option as shown below.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget -i download-file-list.txt</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">10. Download a Full Website Using wget –mirror</h3>
<p style="margin:0 0 1.571em;padding:0;">Following is the command line which you want to execute when you want to download a full website and made available for local viewing.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL</pre>
<ul style="list-style-type:square;list-style-position:initial;list-style-image:initial;margin:0 0 1.571em 1.571em;padding:0;">
<li style="margin:0;padding:0;">–mirror : turn on options suitable for mirroring.</li>
<li style="margin:0;padding:0;">-p : download all files that are necessary to properly display a given HTML page.</li>
<li style="margin:0;padding:0;">–convert-links : after the download, convert the links in document for local viewing.</li>
<li style="margin:0;padding:0;">-P ./LOCAL-DIR : save all the files and directories to the specified directory.</li>
</ul>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">11. Reject Certain File Types while Downloading Using wget –reject</h3>
<p style="margin:0 0 1.571em;padding:0;">You have found a website which is useful, but don’t want to download the images you can specify the following.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --reject=gif WEBSITE-TO-BE-DOWNLOADED</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">12. Log messages to a log file instead of stderr Using wget -o</h3>
<p style="margin:0 0 1.571em;padding:0;">When you wanted the log to be redirected to a log file instead of the terminal.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget -o download.log DOWNLOAD-URL</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">13. Quit Downloading When it Exceeds Certain Size Using wget -Q</h3>
<p style="margin:0 0 1.571em;padding:0;">When you want to stop download when it crosses 5 MB you can use the following wget command line.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget -Q5m -i FILE-WHICH-HAS-URLS</pre>
<p style="margin:0 0 1.571em;padding:0;"><strong>Note:</strong> This quota will not get effect when you do a download a single URL. That is irrespective of the quota size everything will get downloaded when you specify a single file. This quota is applicable only for recursive downloads.</p>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">14. Download Only Certain File Types Using wget -r -A</h3>
<p style="margin:0 0 1.571em;padding:0;">You can use this under following situations:</p>
<ul style="list-style-type:square;list-style-position:initial;list-style-image:initial;margin:0 0 1.571em 1.571em;padding:0;">
<li style="margin:0;padding:0;">Download all images from a website</li>
<li style="margin:0;padding:0;">Download all videos from a website</li>
<li style="margin:0;padding:0;">Download all PDF files from a website</li>
</ul>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget -r -A.pdf http://url-to-webpage-with-pdfs/</pre>
<h3 style="font-weight:normal;font-size:1.286em;line-height:1.222em;margin:1.833em 0 .611em;padding:0;">15. FTP Download With wget</h3>
<p style="margin:0 0 1.571em;padding:0;">You can use wget to perform FTP download as shown below.</p>
<p style="margin:0 0 1.571em;padding:0;">Anonymous FTP download using Wget</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget ftp-url</pre>
<p style="margin:0 0 1.571em;padding:0;">FTP download using wget with username and password authentication.</p>
<pre style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#eeeeee;clear:both;font-family:Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size:.857em;line-height:1.5em;background-position:initial initial;border:1px solid #dddddd;margin:0 0 1.833em;padding:.667em .917em;">$ wget --ftp-user=USERNAME --ftp-password=PASSWORD DOWNLOAD-URL</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[how to download rapidshare files with wget]]></title>
<link>http://box02blog.wordpress.com/2009/09/23/how-to-download-rapidshare-files-with-wget/</link>
<pubDate>Wed, 23 Sep 2009 18:35:53 +0000</pubDate>
<dc:creator>box02</dc:creator>
<guid>http://box02blog.wordpress.com/2009/09/23/how-to-download-rapidshare-files-with-wget/</guid>
<description><![CDATA[က်ေနာှက ရုပ္ရွင္ျကိုက္တဲ့သူျဖစ္တာမို့ ရုပ္ရွင္ေတြကို အင္တာနက္ကေန download လုပ္ဖို့အတြက္ အလြယ္ကူဆံုးျ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>က်ေနာှက ရုပ္ရွင္ျကိုက္တဲ့သူျဖစ္တာမို့ ရုပ္ရွင္ေတြကို အင္တာနက္ကေန download လုပ္ဖို့အတြက္ အလြယ္ကူဆံုးျဖစ္တဲ့နည္းကို ရွာျပီး သံုးေနခဲ့ပါတယ္။ က်ေနာှက တစ္ခါတစ္ေလ ရုပ္ရွင္ ၁၅ ကား အကား ၂၀ ေလာက္ကို တစ္ခါတည္း download လုပ္တာဆိုေတာ့ ျကည့္ခ်င္တဲ့ရုပ္ရွင္ rapidshare links ေတြကို အရင္စုစည္းျပင္ဆင္ပါတယ္။ လင့္ခ္ေတြအာလံုးပါတဲ့ text file တစ္ဖိုင္ကိုျပင္ဆင္ပါတယ္။ ဒီလိုျပင္ဆင္တဲ့ေနရာမွာလဲ ကိုယ္ download လုပ္ခ်မယ့္ links ေတြက အလုပ္လုပ္ေသးလား ေသေနျပီလားဆိုတာကိုပါ တစ္ခါတည္းစစ္ေဆးျကည့္ရွုျပီးမွ အလုပ္လုပ္တဲ့လင့္ခ္ေတြကိုပဲ တစ္ခါတည္း စုစည္းပါတယ္။ အဲလိုလင့္ခ္ေတြကို text file နဲ့ျပင္ဆင္ျပီးမွ wget နဲ့ တစ္ခါတည္း ဆြဲခ်ေတာ့ပါပဲ။ ဘာမွထပ္လုပ္စရာမလိုေတာ့ပါဘူး။</p>
<p><strong>Requirements:</strong><br />
1) Internet connection<br />
2) <a href="http://www.mozilla.com/en-US/firefox/all.html">Mozilla Firefox</a><br />
3) Firefox plugins: <a href="https://addons.mozilla.org/en-US/firefox/addon/748">Greasemonkey</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/605">Copy Links</a><br />
4) Userscript: <a href="http://userscripts.org/scripts/show/9467">Rapidshare Links Checker</a><br />
5) Text Editor: <a href="http://projects.gnome.org/gedit/">gedit</a>, <a href="http://notepad-plus.sourceforge.net/uk/site.htm">notepad++</a> (or whatever)<br />
6) <a href="http://www.gnu.org/software/wget/">wget</a><br />
7) Rapidshare Premium account</p>
<p><strong>Environments Setup:</strong><br />
Firefox မွာ အေပာှကလိုအပ္တဲ့ plugins ေတြ install လုပ္ပါ။ Greasemonkey plugin ကို install လုပ္ျပီးတဲ့အခါ Rapidshare Links Checker userscript ကို install လုပ္ပါ။ ကိုယ့္စက္ထဲမွာ text editor နဲ့ wget ကိုရွိေနမယ္လို့ယူဆပါမယ္။ မရွိရင္ install လုပ္ေပးထားမယ္။ ေနာက္ျပီး ကိုယ့္စက္က Internet နဲ့ခ်ိန္ဆက္ထားတယ္လို့လဲ ယူဆပါတယ္။</p>
<p><strong>Downloading:</strong><br />
<code>$ wget --auth-no-challenge --user=RS_USER_LOGIN --password=RS_PREMIUM_PASSWORD -i rs_links.txt</code></p>
<p>ဒီေနရာမွာ;<br />
RS_USER_LOGIN ဆိုတာက rapidshare premium user login name ပါ။<br />
RS_PREMIUM_PASSWORD ေနရာမွာ rapidshare premium password ကိုအစားသြင္းေပးပါ။<br />
rs_links.txt ဆိုတာက rapidshare links ေတြပဲ စုစည္းထားတဲ့ text file ပါ။</p>
<p>Enjoy with it! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[wget]]></title>
<link>http://progarquivos.wordpress.com/2009/09/10/wget/</link>
<pubDate>Thu, 10 Sep 2009 18:57:45 +0000</pubDate>
<dc:creator>progarquivos</dc:creator>
<guid>http://progarquivos.wordpress.com/2009/09/10/wget/</guid>
<description><![CDATA[1) Downloading a remote file – Perhaps you are downloading an update to an application and have been]]></description>
<content:encoded><![CDATA[1) Downloading a remote file – Perhaps you are downloading an update to an application and have been]]></content:encoded>
</item>
<item>
<title><![CDATA[Using wget to resume downloads that require cookie credentials]]></title>
<link>http://blog.thewheatfield.org/2009/09/07/using-wget-to-resume-downloads-that-require-cookie-credentials/</link>
<pubDate>Mon, 07 Sep 2009 15:12:11 +0000</pubDate>
<dc:creator>thewheat</dc:creator>
<guid>http://blog.thewheatfield.org/2009/09/07/using-wget-to-resume-downloads-that-require-cookie-credentials/</guid>
<description><![CDATA[I&#8217;ve been having an issue recently (not sure if it&#8217;s the Mac) but it has indeed become v]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;ve been having an issue recently (not sure if it&#8217;s the Mac) but it has indeed become very apparent to me, that I would download things (applications / videos / ISOs / etc) in Firefox and the download would &#8216;finish&#8217;. It shows it as completed in the downloads window but in fact it is a truncated download. As seen in the screenshots below the SDK finished at 1.6GB when in fact the actual full file size is 2.1GB. </p>
<p><a href="http://thewheat.wordpress.com/files/2009/09/misleading-completed-firefox-download.png"><img src="http://thewheat.wordpress.com/files/2009/09/misleading-completed-firefox-download.png" alt="Misleading completed Firefox download" title="Misleading completed Firefox download" width="500" height="68" class="alignnone size-full wp-image-1041" /></a></p>
<p>I initially tried using wget to download the file but got a ERROR 403: Forbidden error probably due to some cookie credentials. So not wanting to waste my 1.6GB download that took about 12 hours I resorted to looking into getting wget to work with cookies and was happy to see that the folks who created wget indeed had an option to load the cookies file. Sweet! Very sweet indeed. So next task was to get the cookies out of Firefox which was a bit more of an issue. </p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/8154">Export Cookies</a> was known to work but it was not compatible with Firefox 3.5 so I had to download the <a href="https://addons.mozilla.org/en-US/firefox/addon/6543">Nightly Tester Tools</a> to allow Export Cookies to work. Export the cookies (&#8220;Tools &#62; Export cookies&#8221;) and in Terminal/Command line and enter the wget command to resume the download as follows:<br />
<code>wget --server-response --continue --load-cookies cookies.txt http://location/of/download</code></p>
<p>Download <a href="http://www.gnu.org/software/wget/">wget</a> (<a href="http://gnuwin32.sourceforge.net/packages/wget.htm">Windows</a> &#124; <a href="http://www.statusq.org/archives/2008/07/30/1954/">Mac</a>)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Полезные команды Linux]]></title>
<link>http://dasalam.wordpress.com/2009/09/07/useful-linux-commands/</link>
<pubDate>Mon, 07 Sep 2009 13:49:34 +0000</pubDate>
<dc:creator>dasalam</dc:creator>
<guid>http://dasalam.wordpress.com/2009/09/07/useful-linux-commands/</guid>
<description><![CDATA[Заменяем определенный текст в файле perl -i -pe 's/text0/text1/;' file_name Здесь text0 — последоват]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Заменяем определенный текст в файле</strong></p>
<pre class="brush: bash;">perl -i -pe 's/text0/text1/;' file_name</pre>
<p>Здесь text0 — последовательонсть символов в текстовом файле которую хотим заменить, text1 — последовательность символов, которая и заменит исходный отрывок text0. file_name — имя файла в котором производится замена, можно использовать символы групповых операций (* ? []).</p>
<p><!--more--></p>
<p><strong>Удаляем теги html из текстового файла</strong></p>
<pre class="brush: bash;">sed 's/&lt;[^&gt;]*&gt;//g' index.html</pre>
<p>index.html — файл в котором ищутся и удаляются теги.</p>
<p><strong>Принудительное завершение сеанса через 24 часа</strong></p>
<pre class="brush: bash;">fuser -k `who -u &amp;#124; awk '$6 == &quot;old { print &quot;/dev/&quot;$2'}`&lt;/code&gt;&lt;/pre&gt;
Эта команда откроет заново login shell для любого пользователя, находящегося за компьютером более суток. Можно контролировать детей =).

&lt;strong&gt;Создание iso образа с CD/DVD&lt;/strong&gt;
[sourcecode language='bash']readom dev=/dev/scd0 f=/path/to/image.iso</pre>
<p>/dev/scd0 — ваш привод для CD/DVD дисков (можно уточнить при помощи комнады ls /dev/sd*). /path/to/image.iso — путь к будущему iso образу. dd подходит хуже для этих целей, т.к. она не делает никакую проверку на ошибки. Использую команду dd вы не можете точно знать скопирована вся информация или нет.</p>
<p><strong>Выключаем машину после загрузки файла (wget&#8217;ом)</strong></p>
<pre class="brush: bash;">while [ -n &quot;`pgrep wget`&quot; ]; do sleep 2 ;done; [ -e &quot;/tmp/nosleep&quot;] &amp;#124;&amp;#124; echo mem &gt;/sys/power/state</pre>
<p>Вы скачиваете файл из сети, но уже наступил вечер и вам хочется пойти спать. Кто выключит ПК за вас? Можно конечно оставить работать компьютер до утра, а можно и воспользоваться приведенной командой.<br />
Если вдруг вы решите, что ПК отключать не надо, а загрузку приостанавливать не хочется, то просто созадйте файл nosleep в директории /tmp/ (touch /tmp/nosleep).</p>
<p style="text-align:right;"><a href="http://www.commandlinefu.com/">http://www.commandlinefu.com/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ubuntu - Agregar una llave de un repositorio desde la terminal]]></title>
<link>http://cirovladimir.wordpress.com/2009/09/06/ubuntu-agregar-una-llave-de-un-repositorio-desde-la-terminal/</link>
<pubDate>Sun, 06 Sep 2009 23:41:34 +0000</pubDate>
<dc:creator>cirovladimir</dc:creator>
<guid>http://cirovladimir.wordpress.com/2009/09/06/ubuntu-agregar-una-llave-de-un-repositorio-desde-la-terminal/</guid>
<description><![CDATA[Hay muuuchas cosas que es mas facil hacerlas desde la terminal. Una de ellas es agregar la llave de ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img style="max-width:800px;" src="http://cirovladimir.files.wordpress.com/2009/09/penguinterminal.png" /></p>
<p>Hay <a target="_blank" href="http://linuxcommand.org/learning_the_shell.php">muuuchas cosas</a> que es mas facil hacerlas desde la <a target="_blank" href="http://www.ibm.com/developerworks/linux/library/l-lpic1-v3-103-1/index.html">terminal</a>. Una de ellas es agregar la llave de un repositorio desde la terminal.<br />Por ejemplo, hoy queria instalar <a target="_blank" href="https://launchpad.net/entertainer">este software</a> para la reproduccion de archivos multimedia. Segun las instrucciones de su sitio tenia que ir a un link, copiar el texto que aparecia ahi, pegarlo en un archivo nuevo, luego ir a la configuracion de los repositorios e importar el archivo recien creado. <br />Pues la verdad se me hizo mas facil hacer lo siguiente:<br />
<blockquote>wget -q &#8220;http://keyserver.ubuntu.com:11371/pks/lookup?op=get&#38;search=0&#215;2EEE37419EDAD4D4&#8243; -O &#8211; &#124; sudo apt-key add -</p></blockquote>
<p>El primer comando (wget) descarga (de forma silenciosa, &#8220;-q&#8221;) el archivo indicado en la URL y lo envia a la salida estandar (&#8220;-O -&#8221;) despues mediante el uso de una <u>tuberia</u> ( &#8220;&#124;&#8221; ) lo envia al comando apt-key, el cual la agrega leyendola de la entrada estandar (&#8220;-&#8221;).<br />Nota: Hay que poner ojo, entre -O y &#8211; hay un espacio, para ver que onda con esto checa la doc mediante &#8220;man wget&#8221; y &#8220;man apt-key&#8221;</p>
<p>byte!</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=826125c1-6b7b-86e4-bc82-649b903657c7" /></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[wget su linux, dietro proxy server]]></title>
<link>http://giolek.wordpress.com/2009/08/19/wget-su-linux-dietro-proxy-server/</link>
<pubDate>Wed, 19 Aug 2009 06:27:06 +0000</pubDate>
<dc:creator>giolek</dc:creator>
<guid>http://giolek.wordpress.com/2009/08/19/wget-su-linux-dietro-proxy-server/</guid>
<description><![CDATA[Se avete la necessità di utilizzare la vostra distribuzione server dietro un proxy e dovete utilizza]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Se avete la necessità di utilizzare la vostra distribuzione server dietro un proxy e dovete utilizzare wget eccovi alcuni comandi utili.</p>
<p>Definire una variabile di sistema prima di utilizzare wget, nel seguente modo:<br />
<code>export http_proxy="http://<em>proxy.example.com</em>:<em>8080</em>"</code><br />
Quindi potete specificare la seguente opzione in wget dalla linea di comandoper attivare il funzionamento dietro un proxy:<em> </em><br />
<code>–proxy=on</code><br />
la seguente è per disattivare l&#8217;utilizzo dietro proxy server:<em> </em><br />
<code>–proxy=off</code><br />
Se nel vostro server proxy sono richiesti nome utente e password potete usare le seguenti opzioni, sempre nella linea di comando di wget:<br />
<code>-proxy-username="<em>user name</em>" –proxy-passwd="<em>password</em>"</code><br />
Un alternativa è specificarli nella variabile di sistema  http_proxy / ftp_proxy come segue:<br />
<code>export http_proxy="http://<em>username</em>:<em>password</em>@<em>proxy.example.com</em>:<em>8080</em>"</code></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
