patrick's blog

Recover lost files in Linux

Help! (again)

During my around-the-world trip I made a lot of photos. Of course, I am a good boy, so I uploaded them all to dropbox whenever there was an oppertunity. However, at some point disaster striked, and I was left with a 8Gb sd card which did not work anymore. How bad can things get.

So first there are 2 important steps to not loose your pictures:

Test your Antivirus (Fireclam)

When using an antivirus solution make sure it is tested and does protect you. For Fireclam I needed a testfile to check how it works. Read on to see how you can test it.

Since Online Banking in the Netherlands requires you to have an up-to-date anti-virus solution, I decided to install clamav. Of course, this is not super important on my Linux computers (especially since mine are ArchLinux and thus up-to-date).

Find which jar file contains a class

Very handy to know... how to find out which jar file to include in a project to make your imports work. The answer is simple... search which jar file implements that class. I use the following bash function for this:

for f in `find . -name '*.jar'`; do echo $f && jar tvf $f | grep -i "$1"; done

This will search all jars in all subfolders for the text provided in $1!

Hope it helps!

ArchLinux and ownCloud: CSync failed to create a lock file

This time a short how-to about solving the csync error for the ownCloud client on Archlinux.

Every now and again the ownCloud client does not want to contect anymore due to the following error:
CSync failed to create a lock file

The issue seems to be easily solved by removing the lock-file, as suggested (for example) here and here. However, these folders and files do not exist in ArchLinux.

Using git-svn (in ArchLinux)

Using git-svn is very interesting for those forced to use an SVN repository, but preferring GIT (just like me). In this article I will put some tips and tricks I use myself (as well as my standard workflow). For the starters I will also add some hints and tips on how to ensure that the required packages are installed.

My .gitignore file

For future reference. This is the place I will post / update my .gitignore file. At this moment the file is used in project containing:
- Latex
- C++ with Qt
My GIT code is in Great service!
Then... the code:

# In repository we don't need to have:
# Compiled object files

# Generated MOC, resource and UI files

# Qt User Project files

Install LastPass on ArchLinux

Installing the offline application of LastPass in ArchLinux is not too easy for those who do not want to puzzle a bit.

First you need to download the right version of LastPass. You can download it via [ -> Download -> Linux -> LastPass Pocket (Ubuntu/Debian) :: DOWNLOAD 64bits] or via this link.

Make sure you have the Ubuntu/Debian version!

After the download, unpack the tar.bz2 package:

KDE4 and the Win (windows) key

This will be my first post about KDE (KDE4). I just switched from Gnome3. Not because I do not like the layout, but because it is way too buggy for me. Yak!
Anyway, I am going to try to get used to KDE. I tried before, but I never managed. I do not like to have all those settings around... and all those ways to change the layout of a window... and that it changes by accident if you click somewhere. Heck... I will try for now.


© 2008 - 2014 Patrick Hanckmann

View Patrick Hanckmann's profile on LinkedIn