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!

Jun 042013
 

While installing a new computer (soon a post on my new arch-linux laptop) I’ve re-discovered a command that I don’t use frequently, but that can be really useful : lsblk

lsblk lists information about all or the specified block devices. The lsblk command reads the sysfs filesystem to gather information.
The command prints all block devices (except RAM disks) in a tree-like format by default.
Continue reading »

Flattr this!

May 092013
 

Edit the menu of grub is not the easiest thing to do, and if you do some mistakes there is the risk that you are not able anymore to boot into your Linux, for these reasons it’s usually suggested to use some tool to edit grub configurations, today I’ll show you Grub Customizer.

Grub Customizer is a graphical settings manager for GRUB2 and BURG that allows anyone to easily set the boot options.

Disclaimer: Grub Customizer should be a stable application, but you should be very careful when using it and be sure to know what you’re doing!
Messing with GRUB2/BURG can cause the system not to boot!
Continue reading »

Flattr this!

May 082013
 

Article by Alessio Bash, published in Italian on his nice ArchLinux Blog

Check constantly your disk or its partitions is one of the essential things in a linux system. Today users usually checks this through graphical tools, but the real Linux old-timers use a terminal and the command “df“. Today I want to show you how to use “dfc“, similar to df but with the addition of colors and a percentage bar. You know, sometimes the eyes wants their part!
Continue reading »

Flattr this!