Aug 252013
 

Recently I installed a Debian 7 VPS on Linode and as first thing I wanted to do an update of the system, but I found a small problem in doing this :

# apt-get update
0% [Connecting to ftp.us.debian.org (2610:148:1f10:3::89)] [Connecting to security.debian.org (2607:ea00:101:3c0b:207:e9ff:fe00:e595)]
Get:1 http://ftp.us.debian.org wheezy Release.gpg [1,672 B]                                                                           
...
Get:15 http://security.debian.org wheezy/updates/main Translation-en [56.6 kB]
Fetched 16.3 MB in <strong>4min 0s</strong> (67.5 kB/s)                                                                                                                                     
Reading package lists... Done

So 4 minutes to just update my repositories (and I had just the default for a Debian 7 just installed), this is due to the fact that linode VPS are IPV6 ready and so the servers of this company try to connect to security.debian.org via its IPv6 address by default when running apt-get update, and that results in having to wait for a lengthy timeout whenever you try to download updates of any sort.

But luckily change the system so apt-get will use IPV4 it’s not so hard.
Continue reading »

flattr this!

Aug 132013
 

If you do a lot of typing it could be useful to have a program that can easily manage your custom shortcuts, create and test them.

For all these things you can use the program autokey.

AutoKey is a desktop automation utility for Linux and X11. It allows you to manage collection of scripts and phrases, and assign abbreviations and hotkeys to these. This allows you to execute a script or insert text on demand in whatever program you are using.

AutoKey features a subset of the capabilities of the popular Windows-based AutoHotkey, but is not intended as a full replacement. For a Linux-based implementation of AutoHotkey, see IronAHK. AutoKey’s GUI features a number of concepts and features inspired by the Windows program PhraseExpress.
Continue reading »

flattr this!

Jun 282013
 

Sometime it happen that the command df and the command du report different results such as:

df -h /tmp
Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs             16G   12G   4G  75%  /tmp

While a du command show somethign different such as:

du -hs /tmp/
10G	/tmp/

There are usually different reason when this happen.
Continue reading »

flattr this!

Jun 192013
 

Sometimes it’s useful to write a bash script that do something like “Do this job, if it’s still running after XX second kill it”, how to implement this in a normal bash environment ?

Nothing simpler: Use the timeout shell command to achieve this.
From its info page:

timeout runs the given COMMAND and kills it if it is still running after the specified time interval

Let’s see how to use it.

Continue reading »

flattr this!

Jun 142013
 

I’m in the process of re-installing ArchLinux on my new Dell Latitude 6530, this is because at the end of the first installation I noticed that while running fdisk -l I received a message like this one (that’s not my original disk, but the message was the same):

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    39070079    19535008+  83  Linux
<strong>Partition 1 does not start on physical sector boundary.
</strong>/dev/sda2        39070080    46877669     3903795   82  Linux swap / Solaris
/dev/sda3   *    46877670   144536804    48829567+  86  NTFS volume set
<strong>Partition 3 does not start on physical sector boundary.
</strong>/dev/sda4       144536805  1250263727   552863461+  86  NTFS volume set
<strong>Partition 4 does not start on physical sector boundary.</strong>

I “shrinked” the original Windows 7 to 40 GB with Gparted live and created the partitions during the installation of ArchLinux with cfdisk so what’s wrong with these operations ?

Continue reading »

flattr this!