Tag Archives: ubuntu

alias ll=?

On Ubuntu the default alias for ll is:

alias ll='ls -alF'

but my favourite one is:

alias ll='ls -lrhat --group-directories-first'

(or “list sorted by modification time, reversed, in long format, human readable with folders first”).
To remember it I just remember “Linux Red HaT” (my firsto distro in nineties)

What’s yours?

Leave a comment

Posted by on 2016/01/28 in sys


Tags: , , ,

make some code!

If you know this pattern:

sudo make install

you know how to build and install something in your computer.

Maybe you also know that it’s better to keep the folder you used to build, because you can do:

sudo make uninstall

and – if you’re lucky – the compiled software will be removed from your pc.

There’s a better way to do that.
There is a utility that generates a (Slackware, RPM, or Debian) package of your software and install this package using the package manager:

sudo checkinstall

You will be able to uninstall the software using your package manager, this way. No more “whereis / locate”, no more “rm -rf”, no more dangling references.

Further readings on and

Leave a comment

Posted by on 2014/05/23 in dev


Tags: , , , , ,

Removing old kernels

Sometimes it’s just time to cleanup…and I, as always, like to work on a command line.

I found that the better way to remove old kernels is just to launch the purge command (incredible, don’t you think? 🙂 but I NEVER remember its correct syntax …
I made up a bash script that remember me how to do all that stuff:

# It just prints the purge commands ready to be copied pasted in a shell

KERNEL=`uname -r`
OLDKERNELS=$(dpkg -l | grep linux-image |grep -v image-generic|grep -v $KERNEL|awk '/^ii/{ print $2 }')

echo "Now using kernel $KERNEL ..."
echo " "

echo "To remove unused kernels (please, check them ALL!):"
while read PKG
  echo "sudo apt-get purge $PKG"
done < <(echo "$OLDKERNELS")
echo " "

I’m actually using a ‘process substitution’ (see LinuxJournal) that is not not POSIX compliant, but it works.

Finally, if you have GRUB installed on an external partition (mounted on /media/GRUB), you’ll need also to print:

echo "To rebuild GRUB:"
echo "sudo grub-mkconfig -o /media/GRUB/boot/grub/grub.cfg"
Leave a comment

Posted by on 2013/03/21 in sys


Tags: , , ,