<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux für alle &#187; bash</title>
	<atom:link href="http://www.simplylinux.ch/tag/bash/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simplylinux.ch</link>
	<description>Jeder kann Linux beherrschen lernen...</description>
	<lastBuildDate>Sat, 19 Nov 2011 17:37:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>PDFs mit Passwort versehen unter KDE 4</title>
		<link>http://www.simplylinux.ch/pdfs-mit-passwort-versehen-unter-kde-4</link>
		<comments>http://www.simplylinux.ch/pdfs-mit-passwort-versehen-unter-kde-4#comments</comments>
		<pubDate>Thu, 01 Sep 2011 14:19:29 +0000</pubDate>
		<dc:creator>hyper_ch</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[hyper_ch]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[kdialog]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[service menu]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://www.simplylinux.ch/?p=415</guid>
		<description><![CDATA[Heute tauchte auf der Arbeit die Frage auf, wie man denn bequem ein PDF mit einem Passwort versehen könnte um es &#8220;sicher&#8221; übers Internet zu verschicken. Die einzige sichere Möglichkeit meiner Meinung nach, wäre halt das Email samt Anhang zu verschlüsseln. Aber das stösst im Geschäftsbereich halt auch auf gewisse Probleme. Obwohl, mit der SuisseID [...]]]></description>
			<content:encoded><![CDATA[<p>Heute tauchte auf der Arbeit die Frage auf, wie man denn bequem ein PDF mit einem Passwort versehen könnte um es &#8220;sicher&#8221; übers Internet zu verschicken. Die einzige sichere Möglichkeit meiner Meinung nach, wäre halt das Email samt Anhang zu verschlüsseln. Aber das stösst im Geschäftsbereich halt auch auf gewisse Probleme. Obwohl, mit der SuisseID sollte das ja in Zukunft bald mal beseitigt sein.</p>
<p>Zuerst dachte ich, Okular müsste das sicherlich können, denn Okular kann ja auch ausgefüllte Formulare in PDFs speichern. Fehlanzeige!</p>
<p>Also istder nächste Weg gewesen ein Shellscript zu basteln, da ich auch über Google nicht fündig wurde. Das war relativ einfach. Jedoch gibts ein Problem. Nicht jeder mag die Kommandozeile.</p>
<p>Blieb mir also nichts weiter übrig als das irgendwie unter KDE zu machen.</p>
<p><span id="more-415"></span></p>
<p>Ich dachte mir, bequem wäre es, wenn man einfach ein PDF rechts anklicken könnte, dann ein Kontextmenu auswählen, Passwort eingeben und gut ist.</p>
<p>Ich bin dann relativ schnell in den Service Menu Seiten und KDE Dialog gelandet:</p>
<p><a href="http://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus" title="http://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus">http://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus</a><br />
<a href="http://techbase.kde.org/Development/Tutorials/Shell_Scripting_with_KDE_Dialogs" title="http://techbase.kde.org/Development/Tutorials/Shell_Scripting_with_KDE_Dialogs">http://techbase.kde.org/Development/Tutorials/Shell_Scripting_with_KDE_Dialogs</a></p>
<p>Das hat geholfen. Als war die Aufgabe nur noch, das Shellscript in das Service Menu korrekt einzubinden. Zuerst musste ich das Service Menu Verzeichnis erstellen:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">mkdir</span> <span class="re5">-P</span> ~<span class="sy0">/</span>.kde<span class="sy0">/</span>share<span class="sy0">/</span>kde4<span class="sy0">/</span>services<span class="sy0">/</span>ServiceMenus</pre></div></div>
<p>Danach habe ich einen neue Eintrag angelegt:</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">touch</span> ~<span class="sy0">/</span>.kde<span class="sy0">/</span>share<span class="sy0">/</span>kde4<span class="sy0">/</span>services<span class="sy0">/</span>ServiceMenus<span class="sy0">/</span>addPDFPasswd.desktop</pre></div></div>
<p>und schlussendlich mit einigem Probieren die .desktop Datei mit folgendem Inhalt gefüllt:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="br0">&#91;</span>Desktop Entry<span class="br0">&#93;</span>
<span class="re2">Type</span>=Service
<span class="re2">ServiceTypes</span>=KonqPopupMenu<span class="sy0">/</span>Plugin
<span class="re2">MimeType</span>=application<span class="sy0">/</span>pdf;
<span class="re2">Actions</span>=addPDFPasswd
&nbsp;
<span class="br0">&#91;</span>Desktop Action addPDFPasswd<span class="br0">&#93;</span>
<span class="re2">Name</span>=Add Password to PDF
Name<span class="br0">&#91;</span>de<span class="br0">&#93;</span>=Passwort zu PDF hinzufügen
<span class="re2">Icon</span>=application-pdf
<span class="re2">Exec</span>=<span class="sy0">/</span>bin<span class="sy0">/</span><span class="kw2">bash</span> <span class="re5">-c</span> <span class="st_h">'InputFile=&quot;$0&quot;; TmpFile=&quot;/tmp/ServiceMenu_addPDFPasswd.pdf&quot;; Program=&quot;pdftk&quot;; if command -v $Program &gt; /dev/null 2&gt;&amp;1 ; then Passwd=`kdialog --password &quot;Set password for the PDF:&quot;`; $Program &quot;$InputFile&quot; output &quot;$TmpFile&quot; user_pw &quot;$Passwd&quot;; mv &quot;$InputFile&quot; &quot;$InputFile.org&quot;; mv &quot;$TmpFile&quot; &quot;$InputFile&quot;; kdialog --msgbox &quot;Password added to selected File\nOriginal was was renamed to .old&quot;; else kdialog --error &quot;$Program could not be found. Please install $Program&quot;; fi'</span> <span class="sy0">%</span>u
&nbsp;
<span class="co0">########################################### The actual script shown nicely #######################################</span>
<span class="co0">#</span>
<span class="co0">#</span>
<span class="co0">#InputFile=&quot;$0&quot;;</span>
<span class="co0">#TmpFile=&quot;/tmp/ServiceMenu_addPDFPasswd.pdf&quot;;</span>
<span class="co0">#Program=&quot;pdftk&quot;;</span>
<span class="co0">#if command -v $Program &gt; /dev/null 2&gt;&amp;1 ;</span>
<span class="co0">#then</span>
<span class="co0">#       Passwd=`kdialog --password &quot;Set password for the PDF:&quot;`;</span>
<span class="co0">#       $Program &quot;$InputFile&quot; output &quot;$TmpFile&quot; user_pw &quot;$Passwd&quot;;</span>
<span class="co0">#       mv &quot;$InputFile&quot; &quot;$InputFile.org&quot;;</span>
<span class="co0">#       mv &quot;$TmpFile&quot; &quot;$InputFile&quot;;</span>
<span class="co0">#       kdialog --msgbox &quot;Password added to selected File\nOriginal was was renamed to .old&quot;;</span>
<span class="co0">#else</span>
<span class="co0">#       kdialog --error &quot;$Program could not be found. Please install $Program&quot;;</span>
<span class="co0">#fi' %u</span></pre></div></div>
<p>Das Script macht nichts anderes als zuerst zu prüfen, ob pdftk installiert ist, falls ja, dann mache es ein passwortgeschütztes PDF im /tmp Verzeichnis, benennt das Orginal PDF um und verschiebt das passwortgeschützte PDF an die Stelle wo zuvor das Original PDF war.</p>
<p>Sollte pdftk nicht installiert sein, kommt eine Fehlermeldung.</p>
<p>Leider musste ich feststellen, dass der Exec Befehl keine Mehrzeiligen Bash Eingaben mag. Deswegen habe ich das eigentlich Script für die bessere Leserlichkeit nochmals unten angefügt udn auskommentiert. Wenn ich was ändern will, mache ich das im schönen Script und zieh dann alles auf eine Zeile zusammen.</p>
<p>Ebenfalls musste ich feststellen, dass KDE offenbar den Inhalt des Scripts einige Zeit speichert. D.h. wenn die .desktop Datei editiert worden ist, muss noch etwas Geduld geübt werden&#8230; 10 Sekunden sollten reichen&#8230; und dann kann das geänderte Script via Rechtsklick -> Action ausgeführt werden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simplylinux.ch/pdfs-mit-passwort-versehen-unter-kde-4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDF Passwort Management unter Linux &#8211; wie entferne ich das Passwort</title>
		<link>http://www.simplylinux.ch/pdf-passwort-management-unter-linux-wie-entferne-ich-das-passwort</link>
		<comments>http://www.simplylinux.ch/pdf-passwort-management-unter-linux-wie-entferne-ich-das-passwort#comments</comments>
		<pubDate>Thu, 24 Jun 2010 07:31:27 +0000</pubDate>
		<dc:creator>hyper_ch</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[hyper_ch]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[password removal]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[pdf password]]></category>
		<category><![CDATA[pdftk]]></category>
		<category><![CDATA[qpds]]></category>

		<guid isPermaLink="false">http://www.simplylinux.ch/?p=360</guid>
		<description><![CDATA[Ich habe beim Ausländeramt St. Gallen Akteneinsicht in einen Fall beantragt. Vorbildlich haben die die ganzen Akten online. Nur das dumme es, es braucht drei verschiedene Passwörter. Ein Passwort um sich zuerst auf der Plattform authentifizieren zu können. Dann ein zweites Passwort um die PDFs herunter zu laden und schlussendlich noch ein drittes Passwort um [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe beim Ausländeramt St. Gallen Akteneinsicht in einen Fall beantragt. Vorbildlich haben die die ganzen Akten online. Nur das dumme es, es braucht drei verschiedene Passwörter. Ein Passwort um sich zuerst auf der Plattform authentifizieren zu können. Dann ein zweites Passwort um die PDFs herunter zu laden und schlussendlich noch ein drittes Passwort um das PDF überhaupt öffnen zu können. Aus der Perspektive &#8220;Sicherheit&#8221; ist das sicherlich interessant. Allerdings finde ich die drei Passwörter ein bisschen Overkill.</p>
<p>Da es mir zu lästig ist, jedesmal das Passwort einzugeben wenn ich das PDF öffnen will, habe ich mich mal umgeschaut wie man diese Problem beseitigt. Gut, ich könnte natürlich in Okular das Passwort speichern lassen, aber das ist nicht wirklich mein gewünschtes Ziel.</p>
<p>Ich bin dabei auf zwei Tools gestossen, die dabei behilflich sind.</p>
<p><span id="more-360"></span></p>
<h2>pdftk</h2>
<p>pdftk hat mir schon <a href="http://www.simplylinux.ch/pdfs-zusammenfuegen-splitten-via-command-line">hier</a> gute Dienste erwiesen und bietet ausser das Passwort Remove Funktion noch vieles andere an.</p>
<p>Nachfolgend der Code wie man das Passwort entfernen kann:</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">pdftk INPUT.pdf input_pw PASSWORD output OUTPUT.pdf</pre></div></div>
<p>Hiermit wird das INPUT.pdf eingelesen und kann mit dem PASSWORT geöffnet werden und wird sodann als OUTPUT.pdf gespeichert. Allerdings wird dazu das Owner Passwort gebraucht und nicht nur das Benutzer Passwort. Das Ausländeramt St. Gallen gibt freundlicherweise das Owner Passwort bekannt und somit funktioniert pdftk gut.</p>
<h2>QPDF</h2>
<p>QPDF ist ein anderes PDF Tool welches auch Passwörter entfernen kann. Der Vorteil davon ist, dass es kein Java benötigt und eigentlich auch alle anderen PDF Attribute beibehält. Auch hier ist das Passwort entfernen denkbar einfach:</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">qpdf <span class="re5">--password</span>=PASSWORD <span class="re5">--decrypt</span> INPUT.pdf OUTPUT.pdf</pre></div></div>
<p>Die Syntax dürfte auch leicht verständlich sein.</p>
<h2>Fazit</h2>
<p>Ich habe mit qpdf nicht so grosse Erfahrung, soweit ich es aber gebraucht habe scheint es zuverlässig zu sein. Dennoch bevorzuge ich pdftk, da ich das Programm einfach besser kenne.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simplylinux.ch/pdf-passwort-management-unter-linux-wie-entferne-ich-das-passwort/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Completion für Debian</title>
		<link>http://www.simplylinux.ch/bash-completion-fuer-debian</link>
		<comments>http://www.simplylinux.ch/bash-completion-fuer-debian#comments</comments>
		<pubDate>Sun, 26 Apr 2009 11:46:02 +0000</pubDate>
		<dc:creator>hyper_ch</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[hyper_ch]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://www.simplylinux.ch/?p=140</guid>
		<description><![CDATA[Bash Completion ist nützlich um Pfade, Befehlet etc. automatisch zu vervollständigen. Standardmässig hat Debian dies nicht integriert, Ubuntu jedoch schon. Mit zwei kleinen Schritten kann das Bash Completion auch unter Debian eingreichtet werden. 1. Installiere das bash-completion Paket Zuerst muss das bash-completion Paket installiert werden: 2. Bash Completion im Bash Profil hinzufügen Um nur einzelnen [...]]]></description>
			<content:encoded><![CDATA[<p>Bash Completion ist nützlich um Pfade, Befehlet etc. automatisch zu vervollständigen. Standardmässig hat Debian dies nicht integriert, Ubuntu jedoch schon. Mit zwei kleinen Schritten kann das Bash Completion auch unter Debian eingreichtet werden.</p>
<p><span id="more-140"></span></p>
<h3>1. Installiere das bash-completion Paket</h3>
<p>Zuerst muss das bash-completion Paket installiert werden:</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">apt-get</span> <span class="kw2">install</span> bash-completion</pre></div></div>
<h3>2. Bash Completion im Bash Profil hinzufügen</h3>
<p>Um nur einzelnen Benutzer Bash Completion zur Verfügung zu stellen muss deren <i>~/.bash_profile</i> Datei angepasst werden oder aber um es auf dem ganzen System zu Aktivieren muss die <i>/etc/profile</i> Datei editiert und folgendes hinzugefügt werden:</p>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#91;</span> <span class="re5">-f</span> <span class="sy0">/</span>etc<span class="sy0">/</span>bash_completion <span class="br0">&#93;</span>; <span class="kw1">then</span>
 . <span class="sy0">/</span>etc<span class="sy0">/</span>bash_completion
<span class="kw1">fi</span></pre></div></div>
<h3>3. Testen</h3>
<p>Nachdem die entsprechende Datei(en) angepasst wurde, muss man sich aus- und wieder neu einloggen und man kann es nun folgendermassen gebrauchen:</p>
<div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_8"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#codesyntax_8"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_8" onClick="javascript:wpsh_code(8)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_8" onClick="javascript:wpsh_print(8)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">apt-g</pre></div></div>
<p>im Terminal eingeben und dann einmal die TAB Taste drücken. Das <i>apt-g</i> wird nun vervollständigt zu <i>apt-get</i>. Oder gib folgendes ein:</p>
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">apt</pre></div></div>
<p>und dann zweimal TAB drücken und dir werden dann alle möglichen Optionen aufgezeigt. Probiere auch noch folgendes aus:</p>
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">apt-get</span> <span class="kw2">install</span> apa</pre></div></div>
<p>und dann einmal TAB drücken um zu vervollständigen (soweit als möglich) und dann ein zweites Mal TAB drücken um die weiteren Möglichkeiten aufzulisten.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simplylinux.ch/bash-completion-fuer-debian/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FLAC Kompirimierung / Konvertierung</title>
		<link>http://www.simplylinux.ch/flac-kompirimierung-konvertierung</link>
		<comments>http://www.simplylinux.ch/flac-kompirimierung-konvertierung#comments</comments>
		<pubDate>Fri, 06 Mar 2009 19:49:35 +0000</pubDate>
		<dc:creator>hyper_ch</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[hyper_ch]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[flac]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://www.simplylinux.ch/?p=56</guid>
		<description><![CDATA[Speicherplatz ist ja inzwischen relativ billig. Deswegen habe ich mich daran gesetzt, meine gesamte Musiksammlung auf flac umzustellen (lossless). Braucht zwar ca. 5-6x mehr Speicherplatz als VBR 128-192 mp3s aber Platz hat man ja. Trotzdem wollte ich doch auch die flacs soweit komprimieren als möglich. Viele sind das nicht. Ich hab mir also dieses kleine [...]]]></description>
			<content:encoded><![CDATA[<p>Speicherplatz ist ja inzwischen relativ billig. Deswegen habe ich mich daran gesetzt, meine gesamte Musiksammlung auf flac umzustellen (lossless). Braucht zwar ca. 5-6x mehr Speicherplatz als VBR 128-192 mp3s aber Platz hat man ja.</p>
<p>Trotzdem wollte ich doch auch die flacs soweit komprimieren als möglich. Viele sind das nicht. Ich hab mir also dieses kleine Script hier gebastelt:<br />
<span id="more-56"></span></p>
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="co0">#!/bin/bash</span>
&nbsp;
<span class="co0"># Apply max flac compression</span>
<span class="co0"># Apply replay gain</span>
<span class="co0"># Get rid of covers and m3u and other junk files</span>
<span class="co0"># Works recursively</span>
&nbsp;
<span class="re2">src</span>=~<span class="sy0">/</span>hyper<span class="sy0">/</span>Music
<span class="re2">dst</span>=<span class="sy0">/</span>media<span class="sy0">/</span>flac<span class="sy0">/</span>         <span class="co0"># Add trailing slash, otherwise the path will contain a &quot;.&quot;</span>
&nbsp;
<span class="kw3">cd</span> <span class="re1">$src</span>;
<span class="kw2">find</span> <span class="re5">-type</span> d <span class="re5">-exec</span> <span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="re1">$dst</span><span class="br0">&#123;</span><span class="br0">&#125;</span> \;
<span class="kw2">find</span> <span class="re5">-iname</span> <span class="st_h">'*.flac'</span> <span class="re5">-exec</span> flac <span class="re5">-8</span> <span class="re5">--replay-gain</span> <span class="re5">-o</span> <span class="re1">$dst</span><span class="br0">&#123;</span><span class="br0">&#125;</span> <span class="br0">&#123;</span><span class="br0">&#125;</span> \;
&nbsp;
<span class="kw3">echo</span> <span class="st0">&quot;&quot;</span>
<span class="kw3">echo</span> <span class="st0">&quot;&quot;</span>
<span class="kw3">echo</span> <span class="st0">&quot;Done - your new files are at <span class="es2">$dst</span>&quot;</span></pre></div></div>
<p>Einfach Start (src) und Ziel (dst) Verzeichnis angeben und das Skript durchlaufen lassen. Es kann leider kein Multi-Thread aber das spielt nicht so eine Rolle. Das Gute ist, die Tags werden beibehalten.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simplylinux.ch/flac-kompirimierung-konvertierung/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speicherbedarf ermitteln</title>
		<link>http://www.simplylinux.ch/speicherbedarf-ermitteln</link>
		<comments>http://www.simplylinux.ch/speicherbedarf-ermitteln#comments</comments>
		<pubDate>Mon, 23 Feb 2009 10:30:04 +0000</pubDate>
		<dc:creator>hyper_ch</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[hyper_ch]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[disk usage]]></category>
		<category><![CDATA[filesize]]></category>

		<guid isPermaLink="false">http://www.simplylinux.ch/?p=52</guid>
		<description><![CDATA[Ich wollte heute mal wissen, wie gross den meine Musiksammlung ist &#8211; getrennt nach Dateitypen, da ich vor einiger Zeit angefangen habe alles auf .flac umzustellen. Speicherplatz ist ja kein grosses Problem. Eine 1 TB Platte bekommt man ja für ca. CHF 100.00 (oder ein bisschen mehr, weiss nicht wie die Preise jetzt sind) und [...]]]></description>
			<content:encoded><![CDATA[<p>Ich wollte heute mal wissen, wie gross den meine Musiksammlung ist &#8211; getrennt nach Dateitypen, da  ich vor einiger Zeit angefangen habe alles auf .flac umzustellen. Speicherplatz ist ja kein grosses Problem. Eine 1 TB Platte bekommt man ja für ca. CHF 100.00 (oder ein bisschen mehr, weiss nicht wie die Preise jetzt sind) und darauf passen ca. 2300 CDs die in Flac aufgenommen wurden mit maximaler Kompression. Als gibts keinen wirklichen Grund nicht-verlustfrei die Musik zu speichern, auch wenn die Dateien gegenüber .mp3/.ogg 4-5x grösser sind.<br />
<span id="more-52"></span><br />
Den Speicherbedarf kann man also mit einem Einzeiler ausfindig machen:</p>
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">find</span> <span class="sy0">/</span>home<span class="sy0">/</span>hyper<span class="sy0">/</span>Music <span class="re5">-type</span> f <span class="re5">-name</span> <span class="st0">&quot;*.flac&quot;</span> <span class="re5">-ls</span> <span class="sy0">|</span> <span class="kw2">awk</span> <span class="st_h">'{ sum += $7 } END { print &quot;total size: &quot; sum}'</span></pre></div></div>
<p>Einfach den Pfad setzen (hier /home/hyper/Music), dann noch den Dateityp bestimmen (*.flac) und schon kriegt man das Resultat in Bytes zurück.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simplylinux.ch/speicherbedarf-ermitteln/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

