-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
661 lines (324 loc) · 30.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Eventually /dev/null</title>
<meta name="author" content="Philipp Knobel">
<meta name="description" content="As I found out within the last days it isn’t that easy to find informations about how to connect Java through JDBC with a DB2 Database remotely …">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://philnate.me">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="/atom.xml" rel="alternate" title="Eventually /dev/null" type="application/atom+xml">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/lib/jquery.min.js"%3E%3C/script%3E'))</script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
</head>
<body >
<header role="banner"><hgroup>
<h1><a href="/">Eventually /dev/null</a></h1>
<h2>Random thoughts from an emerging Programmer</h2>
</hgroup>
</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:philnate.me" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div class="blog-index">
<article>
<header>
<h1 class="entry-title"><a href="/blog/2013/04/01/db2-remote-connection/">DB2 Remote Connection</a></h1>
<p class="meta">
<time datetime="2013-04-01T15:04:00+02:00" pubdate data-updated="true">Apr 1<span>st</span>, 2013</time>
</p>
</header>
<div class="entry-content"><p>As I found out within the last days it isn’t that easy to find informations about how to connect Java through JDBC with a DB2 Database remotely. So if you should come into these troubles as well, take care of this:<br/>
As DB2 driver you need to use <em>COM.ibm.db2.jdbc.<strong>net</strong>.DB2Driver</em> which is located in the same file (<code>db2java.zip</code>) as the default driver (<em>COM.ibm.db2.jdbc.<strong>app</strong>.DB2Driver</em>) which is “promoted” on most sites. The problem with these two drivers is that they’re not able to work with the other kind of connection. So If you inserted the <strong>net</strong> driver you can’t create local connections and vice versa. If you want to be flexible you need to use as driver <code>com.ibm.db2.jcc.DB2Driver</code> which is capable to handle both types of connections. The driver can be found within the <code>db2jcc.jar</code> file, which should be located in the same place as <code>db2java.zip</code>. At least for me it was further needed to provide a license in order to establish a remote connection, to achieve this add a file called <code>db2jcc_license_cu.jar</code> or maybe some file which is similiar named to your Classpath.<br/>
Connection string: After some search I found the DB2 page where the remote connection string was described. The string has follow this scheme for remote connections: <code>jdbc:db2://SERVERNAME:PORT/DATABASE</code>.<br/>
Not sure if you can leave the DATABASE and run later a <em>Connect to DATABASE</em> Query. At least my quick tries resulted each time with an Exception caused by wrong connection strings.<br/>
If you don’t know on which port your DB2 Instance is running take a look at your <code>/etc/services</code> and look for the corresponding line.<br/>
Now you should be ready to successfully open a remote Connection.</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2012/03/28/mongosniff-error-while-loading-shared-libraries-libpcap-dot-so-dot-0-9/">Mongosniff: Error While Loading Shared Libraries: libpcap.so.0.9</a></h1>
<p class="meta">
<time datetime="2012-03-28T17:26:00+02:00" pubdate data-updated="true">Mar 28<span>th</span>, 2012</time>
</p>
</header>
<div class="entry-content"><p>Lately I’ve worked with <a href="http://mongodb.org">mongoDB</a> which is a great NoSQL database. A tool which can come in handy is <a href="http://mongodb.org/display/DOCS/mongosniff">mongosniff</a>, which comes with mongodb binaries. Mongosniff is something like tcpdump for TCP/IP.<br/>
On my Fedora 16 x86_64 System I’m running mongodb binaries available from mongodb, this allows me to easily run the version I want. But mongosniff didn’t worked right out the box for it. When starting mongosniff I got following error: <strong>mongosniff: error while loading shared libraries: libpcap.so.0.9: cannot open shared object file: No such file or directory</strong>. So this mostly means that libpcap isn’t installed, but this wasn’t the case as you can see soon.<br/>
My first try was to install libpcap for my system but this didn’t solve the problem. A lookup with <code>ldd</code> showed that indeed libpcap.so.0.9 was missing for it:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$:</span> ldd /usr/bin/mongosniff
</span><span class='line'> linux-vdso.so.1 <span class="o">=</span>> <span class="o">(</span>0x00007fffa30d2000<span class="o">)</span>
</span><span class='line'> libpthread.so.0 <span class="o">=</span>> /lib64/libpthread.so.0 <span class="o">(</span>0x0000003ef0400000<span class="o">)</span>
</span><span class='line'> libstdc++.so.6 <span class="o">=</span>> /usr/lib64/libstdc++.so.6 <span class="o">(</span>0x0000003655a00000<span class="o">)</span>
</span><span class='line'> libpcap.so.0.9 <span class="o">=</span>> not found
</span><span class='line'> libm.so.6 <span class="o">=</span>> /lib64/libm.so.6 <span class="o">(</span>0x0000003ef1000000<span class="o">)</span>
</span><span class='line'> libgcc_s.so.1 <span class="o">=</span>&gt; /lib64/libgcc_s.so.1 <span class="o">(</span>0x0000003654600000<span class="o">)</span>
</span><span class='line'> libc.so.6 <span class="o">=</span>> /lib64/libc.so.6 <span class="o">(</span>0x0000003ef0000000<span class="o">)</span>
</span><span class='line'> /lib64/ld-linux-x86-64.so.2 <span class="o">(</span>0x0000003eefc00000<span class="o">)</span>
</span></code></pre></td></tr></table></div></figure>
<p>A check if any libpcap module was available showed that a too new version was installed and that a symlink as libpcap.so.0.9 was missing:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$:</span> ls /usr/lib64/libpcap*
</span><span class='line'>/usr/lib64/libpcapnav.so /usr/lib64/libpcapnav.so.0
</span><span class='line'>/usr/lib64/libpcap.so.1 /usr/lib64/libpcapnav.so.0.0.0
</span><span class='line'>/usr/lib64/libpcap.so.1.1.1 /usr/lib64/libpcap.so
</span></code></pre></td></tr></table></div></figure>
<p>So creating a symlink for libpcap.so.0.9 solved the startup problem: <code>ln -s /usr/lib64/libpcap.so.1.1.1 /usr/lib64/libpcap.so.0.9</code>. If you’re running a 32bit mongodb version you may check your <code>/usr/lib</code> to see if the required libpcap is missing. Don’t know if this problem still exists if you’re running mongodb from the offical repositoy.</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2010/03/09/crontab-r-a-logic-gap/">Crontab -r – a Logic Gap?</a></h1>
<p class="meta">
<time datetime="2010-03-09T15:02:00+01:00" pubdate data-updated="true">Mar 9<span>th</span>, 2010</time>
</p>
</header>
<div class="entry-content"><p>Just worked a bit with crontab to edit some no longer working cron job. But instead of typing <code>crontab -e</code> I had written <code>crontab -r</code>, without any warning or notice my crontab was dropped! What’s the logic behind that behaviour? Isn’t the normal, userfriendly way, that you have to confirm you want to drop something? All Programms I can remember want a confirmation for not saving data or dropping some file, or even for exiting.<br/>
I could life with the problem, if it wouldn’t be too likely to do the typo. But the keys are on a normal qwert(y|z) keyboard next to the other one, so a typo isn’t that unlikely. To avoid the problem I need to add the parameter -i to it, to be asked If I’m sure I want drop that crontab. Since when do I need to add additional parameter to have a higher <em>security</em> level? Normally you need to add parameters to avoid such behaviour not to initialize it.<br/>
But as I just see my crontab version is even the userfriendly one(on Debian 5 amd64), which offers such a parameter <em>-i</em>. The standard BSD(as on Debian 4 x86) one hasn’t this parameter nor does <em>-r</em> ask the user to confirm the operation.<br/>
Anyone knows why it behaves that way, I mean a multiliner crontab isn’t too nice to be lost by accident?</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2010/01/20/the-long-and-stony-way-to-get-mod-authmysql-working/">The Long and Stony Way to Get Mod_AuthMySQL Working</a></h1>
<p class="meta">
<time datetime="2010-01-20T14:59:00+01:00" pubdate data-updated="true">Jan 20<span>th</span>, 2010</time>
</p>
</header>
<div class="entry-content"><p>Somedays it’s really hard to come along with Linux, it’s apps and tools. Recently I’ve tried to use AuthMySQL for authentication within a certain webfolder. To reach this, many trails and even more errors were needed :(.<br/>
The first point was to configure the module correctly, which isn’t that easy, as no post tells which version of AuthMySQL is used nor that there are two of them out, additionally it seems that the module can handle at least partially both directives, but later more.<br/>
I’ve searched quickly for some resources about how to configure AuthMySQL, some of the commands worked other didn’t. After several tries with extensive watching the apache error.log I finally managed to get the authentication running, upto the point of the used Encryption. The first try was to use MD5, but sadly the module did not support that value, although somewhere was talked about it (later I encountered it was for the other module). No Problem there’s another MD5 Setting, let’s switch to that one (Crypt_MD5), now AuthMySQL was working, but didn’t accepted the login details. A google search later I discovered that Crypt_MD5 uses a default Salt of 12 signs (or so) to encrypt the passwords, but my password is encrypted with md5, so no way to get it working. After a few searches why md5 isn’t working with my version of the module I found that <a href="http://www.php-resource.de/forum/showthread/t-34784.html">forum entry</a> which revealed that there are two modules out, which offer Authentication through MySQL.<br/>
But as I already supposed Debian doesn’t offer a package for the other module or I didn’t find it, anyway I got to the <a href="http://modauthmysql.sourceforge.net">website of the other module</a> and downloaded it’s source code. A fast lookup on howto compile and install modules for apache showed that I need to run apxs. But for my debian install the application wasn’t installed, you need to get some apache-dev package to install apxs. A few minutes later I’ve got a matching package and installed it. Next problem: while compiling apxs throws an error 65536, but luckily I found soon an patch, in this <a href="http://www.zoosau.de/technik/mod_auth_mysql-fur-apache22x-kompilieren">blog entry</a> a patch is supplied so that the module was successful compiled under my linux installation.<br/>
The needed renaming of the module directives was done quickly and finally I got the authentication through MySQL working.<br/>
Alltogether it took a few hours to get that simple job working, anyway I’ve increased my knowledge about Apache and Linux, which isn’t that bad :).<br/>
Maybe this post will help the one or other to solve his problems quicker, as it contains quite well condensed errors and their solution.<br/>
If you want to use AuthMySQL get this <a href="http://modauthmysql.sourceforge.net">version</a> as it supplies in my eyes the best functionality. The easiest way to differ both versions is that one requires underlines within the directives and the other one doesn’t (the one which is linked).</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2010/01/16/internet-explorer-and-javascript-problems/">Internet Explorer and JavaScript Problems</a></h1>
<p class="meta">
<time datetime="2010-01-16T14:57:00+01:00" pubdate data-updated="true">Jan 16<span>th</span>, 2010</time>
</p>
</header>
<div class="entry-content"><p>I’ve seen in within my two years of JavaScript progamming some weird things, about browser behaviour. But the one I’ve discovered yesterday tops them all. Some of my JavaScript class use the <code>document.createElement</code> function within it’s init procedure. The Script is working fine used within one Website, even with IE. But when the Script is added to another Website, IE complaints that document.createElement isn’t supported by this Object. An alert directly before the call is executed shows:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="kd">function</span> <span class="nx">createElement</span><span class="p">()</span> <span class="p">{</span>
</span><span class='line'><span class="p">[</span><span class="kr">native</span> <span class="nx">Code</span><span class="p">]</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<p>
But it still doesn’t work in IE.<br/>
Someone ever encountered that problem? I’m currently missing a solutin except the try to manually create the HTML-Node.</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2009/05/27/mbox-to-eml-converter/">Mbox to .eml Converter</a></h1>
<p class="meta">
<time datetime="2009-05-27T14:55:00+02:00" pubdate data-updated="true">May 27<span>th</span>, 2009</time>
</p>
</header>
<div class="entry-content"><p>If you need to extract all mails from a single mbox file to seperate .eml files, take a look at this <a href="http://www.opera-fansite.de/files/Mbox2eml_DEU.zip">tool</a>. I had recently the need to do so, and this tool was just perfect for it. It lets you choose which files to extract from mbox to .eml. In order to import a normal GNU/Linux (any *nix?) mbox into the tool, you need to set as file-ending <code>.mbx</code>. The Only restriction is that it can only handle western character sets, but not sure if that’s a big problem, aren’t most Emails still in latin?<br/>
To run the tool you need to have installed Java Runtime 1.2 or higher</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2008/09/28/wordpress-slash-php-and-the-byte-order-mask-bom/">WordPress(/PHP) and the Byte Order Mask (BOM)</a></h1>
<p class="meta">
<time datetime="2008-09-28T14:51:00+02:00" pubdate data-updated="true">Sep 28<span>th</span>, 2008</time>
</p>
</header>
<div class="entry-content"><p>A few days ago I started to write since some time a Plugin for WordPress again, for a customer. As I read over on WordPress you shall declare the files as UTF-8, but I would have changed it myself as well. Now after some initial testings I encountered this Problem:<br/>
<code>
<strong>Warning:</strong> Cannot modify header information - headers already sent by (output started at /xampp/htdocs/blog/wp-content/plugins/phRelatedLinks.php:1) in /xampp/htdocs/blog/wp-includes/pluggable.php on line 776)<br/>
</code><br/>
Ah yeah…some known Problem within the WordPress Universe and the PHP one as well, caused by the Problem that infront of the starting <code>< ?php</code> are some other signs. Now when WordPress wants to send the header Information of the Page the whitespace/sign was already sent, but the header needs to be the first part of the website which is sent…therefore PHP throws this error.<br/>
Unfortunally this wasn’t the case for my Problem. As I had no clue what it could be else I searched for some time, and anything I could find told it’s a problem with leading signs before <code>< ?php</code>. Luckily I found <a href="http://robv.de/read/headers-already-sent-durch-wordpress-plugin">this Post with the same Problem</a>, which solved it.<br/>
While saving my file with SciTE as <em>UTF-8</em>, SciTE added a Byte Order Mask to the file, which isn’t needed at all as UTF-8 doesn’t encounter differences between big-Endian and little-Endian. Anyway it’s now widely used to easily tell apart <em>UTF-8</em> and <em>ISO-8859</em>. So if a file contains as starting Bytes: <code>EF BB BF</code> it’s (mostly) a <em>UTF-8</em> formatted file. But as these Bytes aren’t displayed within SciTE at all, you can go crazy with it. To write a file without this optional BOM you need to select as Encoding <em>UTF-8 Cookie</em> within SciTE.<br/>
Now the real cause was found, and it wasn’t WordPress who tried to drive me crazy at all. A look within PHP revealed that PHP isn’t able to interpret these Bytes as mark for a following <em>UTF-8</em> Encoding. The <a href="http://bugs.php.net/bug.php?id=22108">related Bug Post</a> was closed as won’t fix for PHP 5/4, the correct behavior will be implemented with PHP 6+.<br/>
In the meantime I hope that not too many other people will encounter that Problem and if, they’re able to find the solution faster than me!</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2008/09/24/image-dot-onload-problems/">Image.onload() Problems</a></h1>
<p class="meta">
<time datetime="2008-09-24T14:48:00+02:00" pubdate data-updated="true">Sep 24<span>th</span>, 2008</time>
</p>
</header>
<div class="entry-content"><p>Since a while I’m working with Javascript. I have to say, that it’s for sure not that hard to write cross-browser Source Code, like it’s still with CSS. But some parts aren’t easy to get them working. A recent problem is indeed the image.onload. At first it’s obviously that you should register an onload EventListener, before you assign an Image, like this:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="nx">image</span><span class="p">.</span><span class="nx">onload</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span> <span class="nx">alert</span><span class="p">(</span><span class="s2">"let's do something in here!"</span><span class="p">);};</span>
</span><span class='line'><span class="nx">image</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"myURL"</span><span class="p">;</span>
</span></code></pre></td></tr></table></div></figure>
<p>
As it’s quite possible that the other way around, the picture is already loaded before the EventListener is registered.<br/>
But Hey! That’s no reason to make this mistake a few times…Now after you solve that self-made problem you can run into the next one! Opera calls the onload Event, only if the Object is newly created or the Image loaded isn’t already cached. That’s the state of <em>Opera 7.5</em>, as I read several times on various sites, this problem was fixed with <em>Opera 8.x</em>. But now it seems that this Problem is back with <em>Opera 9.26+</em>( or earlier).<br/>
Unfortunately my Script needs to be noticed everytime a new Image is loaded, although it may already be cached. The only way I’m aware of getting what I want, is to disable the Cache of Opera, through Opera’s settings or per HTTP Header. Ok another way would be a function which looks the whole time if the image is changing, but both aren’t that what I’m searching for. Someone knows if it’s possible to get some real onload for Images in Opera, without any of the previously mentioned <em>hack</em>?<br/>
Or can Opera fix this problem? It’s working correctly in IE, why not in Opera?</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2008/03/07/find-missing-argument-to-exec/">Find: Missing Argument to `-exec`</a></h1>
<p class="meta">
<time datetime="2008-03-07T14:45:00+01:00" pubdate data-updated="true">Mar 7<span>th</span>, 2008</time>
</p>
</header>
<div class="entry-content"><p>That’s maybe some common Error you’re receiving, when you’re new to <strong>find and the exec</strong> parameter. So I encountered the Problem as well.<br/>
After a short research within the man page of find the problem was found: <code>;</code> needs to be escaped with a Backslash <code>\</code>. The look over to my commandline just showed that this was already the case. Now the internet was asked and most results just reveal the same thing: escape the <code>;</code> with a Backslash.<br/>
Some hits later I found a <a href="http://www.bimminger.at/content/beitrag/tipp_linux_suche_in_datei_bestimmter_inhalt.html">german page</a> where they told that it’s even required that the <code>\;</code> is separated from the previous commands with a space <code> \;</code>. So it’s not enough to write:</p>
<figure class='code'><figcaption><span>wrong invocation</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>find <query> -exec <<span class="nb">command</span>><span class="o">{}</span><span class="se">\;</span>
</span></code></pre></td></tr></table></div></figure>
<p>,
it needs to be (notice the extra whitespace between <code>command</code> and <code>{}</code>):</p>
<figure class='code'><figcaption><span>correct invocation</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>find <query> -exec <<span class="nb">command</span>> <span class="o">{}</span> <span class="se">\;</span>
</span></code></pre></td></tr></table></div></figure>
<p>Well from my point of view some mistake which can be fast overseen, even more if you suppose that <code>{}\;</code> should work out nicely as it’s something which occurs often or everytime within the exec(at least these groups of signs).</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2007/12/05/restoring-windows/">Restoring Windows</a></h1>
<p class="meta">
<time datetime="2007-12-05T23:07:00+01:00" pubdate data-updated="true">Dec 5<span>th</span>, 2007</time>
</p>
</header>
<div class="entry-content"><p>Just the latest example how stupid I can be sometimes:<br/>
I’ve dropped yesterday my Linux Partition from my laptop. It wouldn’t be that problematic if it hadn’t the Boot session on it. Anyway I didn’t noticed that big mistake until I restarted my Laptop and encounter some Error while Loading GRUB.<br/>
After the first seconds of thinking, what happened, I started to knock my head against the table(not really:)). As soon as I stopped to hate myself I made a search for a solution and quickly found an Answer: <a href="http://www.pcwelt.de/forum/windows-xp-server-2003/158389-grub-bootloader-gel-scht-xp-startet-2.html">Start your PC with your Recovery CD</a> and run fixmbr and fixboot. Ok, no big deal…as long as you have your Recovery CD with you, but I didn’t…(second time some knocking, was hearable).<br/>
So my next try was to get some Recovery Application on the base of some small DOS Boot, I found quickly something, anyway it didn’t worked for XP(at least for my PC it didn’t).<br/>
Next I’ve inserted the Vista Recovery from some friend( I would like to mention that without any Install you can run already some Safe-Mode like Vista…with working Notepad, aso.). I was even able to start a Cmd.exe, but the next shock wasn’t far as I noticed that <code>fixmbr</code> and <code>fixboot</code> didn’t worked within Vista. A new search was on the way, on how to get fixmbr&fixboot working on Vista Recovery CDs, again I had luck and found soon, <a href="http://www.linuxforums.org/forum/installation/94066-need-fix-mbr.html">a solution</a>…you have to call them as Parameter through some other application:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>bootrec.exe /fixmbr
</span><span class='line'>bootrec.exe /fixboot </span></code></pre></td></tr></table></div></figure>
<p>
I’ve applied both commands, the had be done correctly and after a Restart I was able to Boot Windows again. The only good point is that I don’t have to take care on startup if the correct OS is selected, anymore :).<br/>
A side note for the next time I make any changes to an OS, be sure to have the recovery CD near myself!</p>
</div>
</article>
<div class="pagination">
<a class="prev" href="/blog/page/2/">← Older</a>
<a href="/blog/archives">Blog Archives</a>
</div>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
<li class="post">
<a href="/blog/2013/04/01/db2-remote-connection/">DB2 Remote Connection</a>
</li>
<li class="post">
<a href="/blog/2012/03/28/mongosniff-error-while-loading-shared-libraries-libpcap-dot-so-dot-0-9/">mongosniff: error while loading shared libraries: libpcap.so.0.9</a>
</li>
<li class="post">
<a href="/blog/2010/03/09/crontab-r-a-logic-gap/">crontab -r – a logic gap?</a>
</li>
<li class="post">
<a href="/blog/2010/01/20/the-long-and-stony-way-to-get-mod-authmysql-working/">The long and stony way to get Mod_AuthMySQL working</a>
</li>
<li class="post">
<a href="/blog/2010/01/16/internet-explorer-and-javascript-problems/">Internet Explorer and JavaScript problems</a>
</li>
</ul>
</section>
<section>
<h1>GitHub Repos</h1>
<ul id="gh_repos">
<li class="loading">Status updating…</li>
</ul>
<a href="https://github.com/philnate">@philnate</a> on GitHub
<script type="text/javascript">
$(document).ready(function(){
if (!window.jXHR){
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
jxhr.src = '/javascripts/libs/jXHR.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jxhr, s);
}
github.showRepos({
user: 'philnate',
count: 0,
skip_forks: true,
target: '#gh_repos'
});
});
</script>
<script src="/javascripts/github.js" type="text/javascript"> </script>
</section>
<section class="googleplus">
<h1>
<a href="https://plus.google.com/110229873910589591633?rel=author">
<img src="http://www.google.com/images/icons/ui/gprofile_button-32.png" width="32" height="32">
Google+
</a>
</h1>
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright © 2013 - Philipp Knobel -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>