Wednesday, January 13, 2010

Blog Linsey Dawn Mckenzie

Cloning a virtual machine OpenVZ







When it is to recover files from a Web server Microsoft IIS (yes it happens in the life of a sysadmin linux) should not hesitate to use

curl (instead of wget)
Indeed curl (using libcurl) supports all variants of authentication, including some specific to Microsoft as the famous ntlm. To check if you have curl, you can run a simple
dpkg-l
ii libcurl3-gnutls 7.19.5-1ubuntu2 Multi-protocol file transfer library (GnuTLS ii libcurl4-gnutls-dev 7.19.5-1ubuntu2 Development files and documentation for libc ii php5-curl-2ubuntu6 5.2.10.dfsg.1 CURL module for php5 .3
-get install curl curl - proxy''- verbose - ntlm - netrc http://myserver.mydomain.ch/iislog/
all the many options are documented in "man" pages or online at - proxy'': to force the non-use of corporate proxy, in fact in my case I have an environment variable like " http_proxy = http://monproxy.mondomaine.ch:8080/ "out there and curl and smart enough to use it by default, except that in my case I want to go on a server in house or my need to disable the use proxy
- verbose to have some useful info in case of problems, practically this option is rarely used in production
- ntlm: in this case I force the use of authentication ntlm, I could use - and Curl anyauth allegedly tried different authentication mode to find the right (in this case - verbose makes sense) in production it is fashionable to directly use the correct mode (
- Basic
, 
- digest
, - ntlm , and
- Negotiate
.


- netrc
: this option tells curl scan the contents of the file. netrc (_netrc on Windows) to know user and password for a given server basically the file format is the following for each line was:
monserveur.mondomaine.com machine login password monusername monmotdepassesecret.


Moreover it is worth noting for the latter option as this file. Netrc should be in your home directory, and then curl will see is your HOME or looking through the contents of environment variable HOME. (Eg HOME = / home / CGIL) that curl or a shell script using curl with - netrc will fetch the file - netrc in your HOME is not in the theoretical HOME / root as you would expect for just checked it: There are several "vacuum" website, there is even an extension as scrapbook for

firefox which let you read news or online documentation on your netbook even without network connection
but I must say in my case the effectiveness of a tool such as GNU Wget

remains the top of the absolute must and a simple
 


wget-r-N - no-parent - convert-links http: / / www.example.com/projects/doc/


is all the doc subdirectory on the site www.example.com you are going to go offline. The documentation is available wget
line-r option means that recursion is enabled, the option
- no-parent
avoids suck parent directories and - convert-links creates a copy containing hyperlinks Try pointing correctly ! You'll find that you can not do without!

0 comments:

Post a Comment