The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘*nix’ Category

Endian –  Register EFW Community: watch your email addresses

Posted by jpluimers on 2010/10/08

Endian is a nice *nix based open source firewall appliance which has a free Community Edition (which always is a virtual appliance) and paid (either virtual or physical) edition.

It does a lot of things, including spam filtering, http caching, proxying, VPN, DHCP, routing, et cetera.
Those things are done very well, in a reasonably small footprint:

Registering for their community edition is meant to enable the on-line update mechanism for it.
It is supposed to work like this:

  1. You enter your email address
  2. They dispatch a mail to you with a verification link
  3. Clicking the verification link confirms that email address, and flags it in their database as valid for Endian Community updates
  4. You enter the same email on your Endian appliance to get updates

But using that registration is hard: their registration mechanism has at least two flaws: Read the rest of this entry »

Posted in *nix, Endian, Power User | Leave a Comment »

Performed an VMware ESXi 4.0 to 4.1 Update: 5 minutes of work

Posted by jpluimers on 2010/10/06

Thanks to an excellent post by Peter Sebastian from Jargon Technology, it was a breeze to upgrade.

I did the upgrade using Using the vMA virtual appliance, the statements are these:

After bringing the ESXi 4.0 box into maintenance mode, I performed these steps on an SSH connection to the vMA virtual appliance: Read the rest of this entry »

Posted in *nix, ESXi4, Power User, VMware, VMware ESXi, wget | Leave a Comment »

Moving my VMs from ESX 3.5 to ESXi 4.1

Posted by jpluimers on 2010/09/23

After doing quite a bit of research and testing, these are the steps I used to move my VMs from an ESX 3.5 box to an ESXi 4.1 box. Read the rest of this entry »

Posted in Endian, ESXi4, Power User, Veeam | Leave a Comment »

Flusing the DNS cache

Posted by jpluimers on 2010/09/10

DNS is the fundament for resolving names to IP-adreesses.
Without it, no internet browsing or other connections to the outside world.

Like a lot of communication optimizations, caching improves the speed of DNS too ([Wayback/Archive] All programming is an exercise in caching -Terje Mathisen).

Sometimes, bad or unwanted DNS entries end up in your cache.
Those prohibit some of the communication.

Luckily, How to Flush DNS explains this for 3 platforms: Windows, Mac OSX and Linux:

  • Windows:
    ipconfig /flushdns
  • Mac OSX:
    10.5 and up: dscacheutil -flushcache
    pre 10.5: lookupd -flushcache
  • Linux:
    /etc/init.d/nscd restart

–jeroen – now happy he flushed an unwanted DNS entry from the cache

via: [Wayback/Archive] How to Flush DNS – Top Bits

Posted in *nix, Power User | Leave a Comment »

Batch file tricks – double quotes splitting and downloading latest 7-zip

Posted by jpluimers on 2010/09/02

I needed a quick means to download the latest 7-zip from the command-line in Windows.

This batchfile makes use of these tools:

7-zip has a download page that contains lines like these:

    <TD class="Item" align="center"><A href="http://downloads.sourceforge.net/sevenzip/7z465.exe">Download</A></TD>

Read the rest of this entry »

Posted in *nix, 7zip, Batch-Files, Compression, Development, Power User, Scripting, Software Development, wget | Leave a Comment »

wget direct download with referer: SpeedFan

Posted by jpluimers on 2010/06/11

wget is a great tool for downloading from http, https or ftp.
It works on many platforms, and there is a win32 build of wget.

wget usually works, but when a website requires a referer (lots of them seem to), you need to add the referer option like this:

wget -m -np –referer=http://almico.com/sfdownload.php http://www.almico.com/installspeedfan440.exe

The -m -np part creates an on-disk structure for the url, which you need when downloading a complete tree.
I often find that practical even for single files too.

–jeroen

Posted in *nix, Power User, wget | Tagged: | 1 Comment »

Control the VMware VMs from the commandline: vmrun – the successor of vmware-cmd

Posted by jpluimers on 2010/05/19

In the process of upgrading from VMware server 1.0 to 2.0, I found out that vmware-cmd.bat has been replaced by vmrun.exe.

The command-line options are different, and this link explains the vmrun command-line options in detail (well, much better than the vmrun.exe built-in help). The official documentation is available as a PDF.

One of the changes I had to make was from: Read the rest of this entry »

Posted in *nix, Power User, VMware | 2 Comments »

TeamViewer beta for Linux is available

Posted by jpluimers on 2010/04/29

The TeamViewer team announced they have a beta version available for Linux.
The current beta is version v5.0.8252, so it has newer version 5 features.

There are installers for:

  • Red Hat, Fedora, Suse, Mandriva (32/64-Bit)
  • Debian, Ubuntu (32-Bit)
  • Debian, Ubuntu (64-Bit)

And there is a generic .tar.gz file.

You can find them their Linux download page.

With the new beta, they now cover Windows, Mac OS, Linux and the iPhone.
Very convenient indeed!

–jeroen

Posted in *nix, Power User | Leave a Comment »

*nix – Mastering the VI editor

Posted by jpluimers on 2010/04/13

Every once in a while I need to do some text editing in a *nix environment that has a minimum toolset installed.

Which means: use VI.

VI is a versatile text editor from the early *nix days, but it is not straight forward to use.
Since I don’t use VI often enough, I tend to forget some of the commands.

Time to share my favourite VI link: Mastering the VI editor edit: link rot, now it is at Mastering the VI editor.

The link points to the basic stuff, but the page contains most of what you ever want to know about VI.

–jeroen

PS:
If possible, I install the JOE text editor on systems where I am admin.
JOE uses WordStar like key bindings, and supports UTF-8. Talking about “something old, something new” :-)

Posted in *nix, CommandLine, Development, Encoding, Power User, Software Development, Unicode, UTF-8, UTF8, vi | 1 Comment »

Stopping percentage expansion in a Windows batch file

Posted by jpluimers on 2010/04/09

A while ago, I asked a question on percentage expansion in batch-files on superuser.com: a great site with great answers, similar to stackoverflow.com and serverfault.com , but now for asking “Power User” kind of questions.

The percentage sign (%) in URL‘s is to escape (or  URLencode) characters that should not be in a URL itself.
(Note that the old new thing had a very interesting article on URL encoding: there are many different opinions on how to to this ‘right’, and a few of these ‘right’ opinions are not always compatible with each other).

In Windows batch-files and the command-line, the percentage sign is used to expand environment variables, arguments and for loop indexes.
To make life ‘easier’, inside a batch-file, the percentage sign has a slightly different meaning than on the command-line itself.

This can break your batch-files when you use URL encoded parameters.
It does not matter if these parameters are quoted or not: cmd.exe expands them, unless you escape them properly.

So, the command for downloading the URL with wget (similar to curl) differs from running it on the plain command-line or in a batch-file.

Escaping percentage in batch-files

So the best way to escape percentages in batch files is to double them: each % becomes %%.
There is even a very old (MS-DOS era!) knowledge base article about this topic, that I just found when doing the research for this blog article :-)

URL decode

As a sidenote: manually decode thesed escaped URL’s is always a pain.
There are many sites that can do URL decoding on-line.

PS: This was the original question: How can I stop percentage expansion in a batch file? – Super User.

Posted in *nix, Batch-Files, CommandLine, Development, Encoding, Power User, Scripting, Software Development, URL Encoding, wget | 3 Comments »