Posts tagged ‘Shell’

recovering JPGs from a corrupted filesystem

as usually, we took tons of pictures during our last vacation, so eventually the memory card (a SD card) ran out of space. luckily, I had another SD within reach, so we just swapped them and went on…
arriving at home, I started downloading the pictures. when I plugged in the second card, loads of error-messages appeared, indicating a badly broken FAT32 filesystem. none of the newly taken pictures was there :-( Continue reading ‘recovering JPGs from a corrupted filesystem’ »

Monitoring MySQL queries

Monitor All SQL Queries in MySQL is a very nice (though short) posting about how to debug and monitor what’s going on inside your DBMS. There’s supposed to exist a similar tool for MSSQL called “Profiler”.

how is the nautilus thumbnail-filename related with the file it belongs to?

found it somewhere in ubuntuforums.org:

echo -n 'file:///path/to/file/name.jpg' | md5sum

list obsolete and/or locally installed packages in debian/ubuntu

aptitude has a specific list-category to display those when using the curses-GUI, but I do not like it. fortunately, you can use the search-command from the cli-interface with the appropriate search-pattern:

aptitude search "?obsolete"

or as a shorthand:

aptitude search "~o"

See the aptitude Reference Guide for more information.

toying around with OpenSync, Symbian (Nokia E65) and Funambol

Today (2010-02-24) I gave the current opensync a try and experimented a bit with my Nokia E65. Being rather disappointed by funambol since syncing with it drops all the numbers that are marked as “default” in any contact, I really wanted to know if this is a bug in the Symbian SyncML implementation or in Funambol. Continue reading ‘toying around with OpenSync, Symbian (Nokia E65) and Funambol’ »

if you *have* to run windows (ctd.)

here’s a nifty list of commands to start the relevant control-panel / mmc-plugins in wondiws (in german): MSC/CPL-Referenz

to e.g. run the printer control-panel, use this command:

control.exe printers

building “schroot” on RHEL-5.4

“schroot” is a secure chroot tool that allows a non-privileged user on a system to switch to a chroot in a secure manner. This can be used to set up automated builds etc. that don’t have to run as root.

Unfortunately, RedHat Enterprise doesn’t ship with schroot-packages, so here’s a way to build them: Continue reading ‘building “schroot” on RHEL-5.4’ »

cached: git-SVN: Whys And Hows (by amitu)

NOTE: this is just a copy of a blog-posting originally written by Amit Upadhyay. Since I found it really useful, I was rather disappointed to notice it has gone one day. Thankfully it still was in google’s cache, so I decided to make a copy. The rest of the article is a full-quote: Continue reading ‘cached: git-SVN: Whys And Hows (by amitu)’ »

calling native windows programs from cygwin with a sane path environment

some things fail if they’re called from within cygwin due to the path adjustments that are necessary for cygwin.

to call them with a sane (clean) windows-environment, do the following:

OLDPATH="$PATH"
export PATH="$(echo $PATH | tr ':' '\n' | grep /cygdrive | tr '\n' ':')"
 
call your windows tool here
 
export PATH="$OLDPATH"

VisualStudio linking error when re-compiling

Well, I don’t want to lose to many words about VisualStudio compared to any professionally acting development tool, but there seem to be (non-)surprisingly many people out there suffering from the same insane problem…

When re-compiling a project, with the intention of only processing those files that have been changed since the last run (or those depending on such files), the linker fails in a miserable way:

1>CVTRES : fatal error CVT1100: duplicate resource.  type:ICON, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

As common when using tools from Redmond, the error message is of almost no real help, since it does not tell anything about the file(s) that caused this problem. BTW, you won’t find any more details in the oh-so-detailed build-log either…

Well, the relly bad problem here is the linker itself, who tries to incorporate a given icon file into the executable binary, and thus runs the visual studio resource compiler (“RC.EXE” iirc), which in turn terribly cries out noticing there is already a compiled resource file where it would like to create a new one so desperately… Having left you standing there in the rain, compilation fails. It doesn’t even consider to tell you which files conflict or simply override the old resource file.

To avoid this, navigate to the topmost folder in your destination tree, and look for files having a “.res“ suffix. Using a sane cygwin shell, simply do something like:

find | grep ".res$" | xargs rm -v

Having removed the .res-files, recompiling works like a charm. Well, I’m going home into the GNU-zoo now, enough of this annoyance…