Copying very large files across a LAN network

I needed to copy a very large file (~25GB), a virtual machine disk across a network (LAN). Standard Windows copy isn’t great for this, and it kept on getting stuck. I also tried using the copy/xcopy commands but they weren’t much help. The problem was a matter of feedback and recovery. That is, having the ability to see how much longer it was take and to pause/resume in case of a failure.

Finally I settled on TeraCopy, a GUI file copy tool which has a portable version. All up it took about 4 hours to copy across a wireless network. Best thing is you can pause/resume if there are any network drops and you get instant feedback about the copy process. The remaining time is also a little bit more reliable than Microsoft time!

Local Web Development Servers

There are a number of great web development servers available that you can install on your PC to get straight into web development or trying out various web applications without the hassle of installing and configuring your own server.

These include:

  • XAMPP – Apache-MySQL-PHP and Perl server (its portable too)
  • WAMP Server -  Apache-MySQL-PHP for Windows
  • InstantRails – An instant Ruby on Rails Development Server
  • The Uniform Server – Windows-Apache-MySQL-PHP, there’s also a Tomcat Plugin
  • Server2Go – Windows-Apache-MySQL-PHP-Perl and also supports SQLite

Shut down Button on Login Screen

To enable the shut down button on the login screen in Windows Server (classic login), use these steps:

  1. Run Group Policy editor – Start > Run > gpedit.msc
  2. Navigate to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options
  3. Find the entry Shutdown: Allow system to be shut down without having to log on
  4. Set to enabled if disabled

Deleting Stubborn “Stuff” in Microsoft Word

Love it or hate, if you work with computers you generally need to use Microsoft Word. One common problem is that it can be very hard to delete “stubborn” stuff from Microsoft Word, for example a table. If you can’t manage to delete something using the traditional way through menus, try highlighting the offending object (e.g all the cells in the table) and then pressing SHIFT + DELETE.

VMware shared folders can access mapped drives

Turns out that VMware shared folders in VMware workstation can access network shares (e.g. UNC paths) and network drives mapped on your host (main) computer. This can be really handy if you want to access a network share but can’t work out/be bothered setting it up in the VM (e.g for installing software). Simply add the folder and point to the appropriate network share.

It’s nice when something useful that should work, actually does work…

TrueCrypt

TrueCrypt is a free/open source disk encryption system for Windows. It creates encrypted volumes on a hard disk and allows users to mount these volumes as drives in Windows using a secure encryption algorithm, passkey and optionally keyfiles for two-pass authentication.

Mounting a volume using the command line

truecrypt.exe /v C:\VolumeName.example /lC /a /q

Note: use the parameters /l + drive letter e.g. C:\ = /lC

Dismounting a volume using the command line

truecrypt.exe /q /dC

Note: use the parameters /d + drive letter e.g. C:\ = /dC

Also see the TrueCrypt Documentation

The hosts File

The hosts file is text file is used by your TCP/IP connection on the Internet before DNS to map IP addresses to domain names. For really good discussion on what the hosts file is all about, check out the following Security Now Podcast (this is an MP3 file). The hosts file is used in Windows, Mac and Linux systems.

In windows, the hosts file can be found under: C:\Windows\System32\drivers\etc (presuming C:\Windows is your default Windows directory. Otherwise use %WinDir%\System32\drivers\etc.

You can download hosts files that block bad sites by mapping known, bad addresses to localhost (127.0.0.1) which is your own computer. So instead of going to the bad domain name, it just redirects your browser back to your own PC preventing it from loading a known ad, malware or otherwise bad site.

You can download a comprehensive hosts file from MVPS.org.

Note in addition to the hosts file, there is an lmhost file (Lan Manager hosts) used in Microsoft Windows for the Windows Internet Name Service (WINS) protocol.

An example file is provided in %WinDir%\System32\drivers\etc called lmhosts.sam.

This article explains how WINS resolves names and where the lmhosts file comes into play.

The lmhosts file has the same basic syntax as the hosts file with some additional options. After you add entries into it, re-register your dns cache using the following command through command prompt:

$ ipconfig /registerdns

Disabling ipv6 in Linux

Make the following modifications to disable ipv6 in CentOS (Redhat) Linux:

/etc/modprobe.conf

alias net-pf-10 off
alias ipv6 off

/etc/sysconfig/network

NETWORKING_IPV6=no

/etc/sysconfig/network-scripts/ifcfg-eth0

IPV6INIT=no

Also check the otherl ifcfg-eth0…n and wan0…n scripts.

Managing Linux Services

Linux services or daemons are used to automatically start software that provide services such as web servers, database servers, FTP, SSH, Samba. This article is about how to manage linux services and to set them to start automatically. Note that Linux distributions are based on System V which have run levels for system services (as opposed to BSD).

Note that the information provided here does vary between linux distributions. I’m using specific examples from CentOS (and therefore RedHat) linux distributions.

Manging Services

Services that will run can be found in /etc/init.d/.

For any one of these services, you can use the service to manage a service. For example, Samba is managed by the service smb. Use the command:

$ service smb status

This will tell you the status of the daemon programs associated with Samba (e.g. smbd and nmbd). To start or stop them you can issue commands like:

$ service smb start
$ service smb stop
$ service smb restart

Making Services Start Automatically

You can use chkconfig to add a service to a specified run level to make it start automatically.

Linux distributions have 6 run levels and these vary slightly between distributions. In CentOS and RedHat they are:

  • 1 – Single user mode
  • 2 – Multiuser, without NFS (The same as 3, if you do not have networking)
  • 3 – Full multiuser mode
  • 4 – unused
  • 5 – X11
  • 6 – reboot (Do NOT set initdefault to this)

A run level basically tells you what the mode the system is in. To find out what runlevel you are in:

$ runlevel

You can look at /etc/inittab to see how the system is configured to run processes at different run levels. This file maps the association between a run level (e.g. 3) and the services started in that run level which are typically stored in /etc/rc.d under the appropriate run level directory (e.g. /etc/rc.d/rc3.d/).

To make a service such as Samba smb start automatically, you need to add it to appropriate run levels (e.g. 3,4,5) using chkconfig:

$ chkconfig —level 345 smb on

You can then use chkconfig to see what run levels your service will be started at:

$ chkconfig —list smb

Which gives a result like this:

smb 0:off 1:off 2:off 3:on 4:on 5:on 6:off

Media Jukebox

Media Jukebox by J.River is perhaps the best music management/player out there for Microsoft Windows. First off, it has a great interface and doesn’t hog your PC like other media players *cough* Windows Media Player *cough*. It organises your music well, makes it easy to search, includes some nifty features including album coverart, visualisations, and it can even handle the more oppresive media formats (wma I’m looking at you). Its also skinable but I think it looks pretty good out of the box, and has support for some pretty nifty plug-ins.

Powered by WordPress with modified GimpStyle Theme originally designed by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.