{"id":325,"date":"2012-01-25T13:55:41","date_gmt":"2012-01-25T12:55:41","guid":{"rendered":"http:\/\/www.zerfallskonstante.de\/?p=325"},"modified":"2015-03-30T13:54:42","modified_gmt":"2015-03-30T11:54:42","slug":"debian-bash-allerlei","status":"publish","type":"post","link":"https:\/\/www.zerfallskonstante.de\/?p=325","title":{"rendered":"Debian bash Allerlei"},"content":{"rendered":"<p><strong>cp mit Fortschrittsanzeige<\/strong><br \/>\n[bash]<br \/>\ngcp<br \/>\nrsync -Pa &lt;source&gt; &lt;destination&gt;<br \/>\n[\/bash]<\/p>\n<p><strong>HD-Belegung ala Treesize<\/strong><\/p>\n<p>[bash]<br \/>\nncdu<br \/>\n[\/bash]<\/p>\n<p><strong>jpg Aufl\u00f6sung ver\u00e4ndern<\/strong><\/p>\n<p>[bash]<br \/>\nfor file in *.JPG; do convert $file -resize 1024&#215;768 -quality 95 1024&#215;768-$file; done<br \/>\n[\/bash]<\/p>\n<p><strong>pdf-Dateien zusammenf\u00fcgen und\/oder rotieren<\/strong><\/p>\n<p>[bash]<br \/>\npdftk Datei01.pdf Datei02.pdf Datei0x.pdf cat output Datei01-0x.pdf<br \/>\n[\/bash]<\/p>\n<p><em>Seite 13 aus 20 seitigem Dokument entfernen<\/em><\/p>\n<p>[bash]<br \/>\npdftk Datei20.pdf cat 1-12 14-end output Datei20-13.pdf<br \/>\n[\/bash]<\/p>\n<p><em>gesamte Datei (1-end) um 180\u00b0 (South) rotieren<br \/>\n(<strong>N<\/strong>orth|<strong>S<\/strong>outh|<strong>E<\/strong>ast|<strong>W<\/strong>est|<strong>L<\/strong>eft|<strong>R<\/strong>ight|<strong>D<\/strong>own)<br \/>\n<\/em><\/p>\n<p>[bash]<br \/>\npdftk in.pdf cat 1-endS output out.pdf<br \/>\n[\/bash]<\/p>\n<p><strong>Public Key eines Repositories importieren<\/strong><\/p>\n<p>[bash]<br \/>\ngpg &#8211;keyserver hkp:\/\/keyserver.ubuntu.com:80 &#8211;recv-keys<br \/>\n[\/bash]<\/p>\n<p><strong>Eine beliebig gro\u00dfe Dummy-Datei erzeugen<\/strong><br \/>\nIm Beispiel wird eine 10 MB gro\u00dfe Datei dummy_10MB.txt erzeugt.<\/p>\n<p>[bash]<br \/>\ndd if=\/dev\/urandom of=dummy_10MB.txt bs=1M count=10<br \/>\n[\/bash]<\/p>\n<p><strong>ISO-Datei erstellen<\/strong><\/p>\n<p>[bash]<br \/>\ndd if=\/dev\/cdrom of=~\/cdrom_image.iso<br \/>\n[\/bash]<\/p>\n<p><strong>ISO-Datei von einem Verzeichnis erstellen<\/strong><\/p>\n<p>[bash]<br \/>\ngenisoimage -o directory_image.iso \/verzeichnis\/<br \/>\n[\/bash]<\/p>\n<p><strong>ISO-Datei mounten<\/strong><\/p>\n<p>[bash]<br \/>\nmount -o loop .iso \/<br \/>\n[\/bash]<\/p>\n<p><strong>Wenn es mal etwas zu kompilieren gibt:<\/strong><\/p>\n<p>[bash]<br \/>\napt-get install build-essential<br \/>\n[\/bash]<\/p>\n<p><strong>Systemweite Variablen setzen:<\/strong><\/p>\n<p>[bash]<br \/>\nvi \/etc\/profile<\/p>\n<p>export =<br \/>\n[\/bash]<\/p>\n<p>&nbsp;<\/p>\n<p>[bash]<br \/>\nexport http_proxy=http:\/\/:<br \/>\nexport https_proxy=http:\/\/:<br \/>\n[\/bash]<\/p>\n<p>==MULTIMEDIA==<\/p>\n<p><strong>mms:-URL extrahieren<\/strong><\/p>\n<p>[bash]<br \/>\ncurl VIDEO-URL  | grep mms: | cut -d \\&quot; -f 2 | xargs -n1 mplayer -dumpstream -dumpfile DATEINAME.wmv<br \/>\n[\/bash]<\/p>\n<p><strong>.flac in .mp3 konvertieren<\/strong><\/p>\n<p>[bash]<br \/>\napt-get install lame libavcodec-extra-53<br \/>\n[\/bash]<\/p>\n<p>&nbsp;<\/p>\n<p>[bash]<br \/>\n#!\/bin\/sh<br \/>\nfor FILE in *.flac;<br \/>\ndo<br \/>\n    ffmpeg -i &quot;$FILE&quot; -ab 320k -map_meta_data 0:0 &quot;${FILE%.*}.mp3&quot;;<br \/>\ndone<br \/>\n[\/bash]<\/p>\n<p>oder so<\/p>\n<p>[bash]<br \/>\nfor f in *.flac; do ffmpeg -i &quot;$f&quot; -ab 320k &quot;${f%.flac}.mp3&quot;; done<br \/>\n[\/bash]<\/p>\n<p><strong>.ts in .avi konvertieren<\/strong><\/p>\n<p>[bash]<br \/>\nffmpeg -i &lt;input type=&quot;text&quot; \/&gt;.ts -vcodec libxvid -b 2000k -acodec libmp3lame -ac 2 -ar 44100 -ab 192 &lt;output&gt;.avi<br \/>\n[\/bash]<\/p>\n<p><strong>.ts in .mp4 kovertieren<\/strong><\/p>\n<p>[bash]<br \/>\nffmpeg -i .\/video.wmv -vcodec libx264 -preset slow -crf 22 -acodec copy \/home\/\/Videos\/video.mkv<br \/>\n[\/bash]<\/p>\n<p>&nbsp;<\/p>\n<p>[bash]<br \/>\nffmpeg -i \/home\/\/Videos\/04.ts -vcodec libx264 -level 12 -b 128k -r 25 -bt 144k -s 240&#215;192 -coder 1 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method full -subq 7 -me_range 23 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 6 -directpred 2 -trellis 1 -flags2 +bpyramid+wpred+mixed_refs+dct8x8+fastpskip -f mp4 -acodec libfaac -ab 56k -ac 2 -ar 48000 \/home\/\/Videos\/04.mp4<br \/>\n[\/bash]<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Vorlesungs-Video<br \/>\nhttp:\/\/www.j3l7h.de\/videos.html<\/p>\n<p>ffmpeg-URLs<br \/>\n<a title=\"01\" href=\"http:\/\/rodrigopolo.com\/ffmpeg\/cheats.html\"> target=&#8220;01&#8243;&gt;<\/a><br \/>\n<a title=\"02\" href=\"http:\/\/os4.org\/wiki\/ffmpeg.html\"> target=&#8220;02&#8243;&gt;<\/a><br \/>\n<a title=\"03\" href=\"http:\/\/juliensimon.blogspot.de\/2009\/01\/howto-ffmpeg-x264-presets.html\"> target=&#8220;03&#8243;&gt;<\/a><br \/>\n<a title=\"04\" href=\"http:\/\/videoencoding.websmith.de\/encoding-praxis\/linux-ffmpeg-encoding.html\"> target=&#8220;04&#8243;&gt;<\/a><br \/>\n<a title=\"05\" href=\"http:\/\/videoencoding.websmith.de\/encoding-praxis\/linux-handbrake-transcoding.html\"> target=&#8220;05&#8243;&gt;<\/a><br \/>\n<a title=\"06\" href=\"http:\/\/ffmpeg.org\/ffmpeg.html\"> target=&#8220;06&#8243;&gt;<\/a><br \/>\n<a title=\"07\" href=\"http:\/\/ubuntuforums.org\/showthread.php?t=786095\"> target=&#8220;07&#8243;&gt;<\/a><\/p>\n<p>Debian WiFi-Setup:<br \/>\nhttp:\/\/www.cyberciti.biz\/faq\/debian-linux-wpa-wpa2-wireless-wifi-networking\/<\/p>\n<p>Remote root Gnome-login:<\/p>\n<p>[bash]<br \/>\nvi \/etc\/gdm3\/daemon.conf<\/p>\n<p>[security]<br \/>\nAllowRoot=true<br \/>\n[\/bash]<\/p>\n<p>&nbsp;<\/p>\n<p>[bash]<br \/>\nvi \/etc\/pam.d\/gdm3<br \/>\n[\/bash]<\/p>\n<p>Kommentar entfernen<\/p>\n<p>[bash]<br \/>\nauth    required        pam_succeed_if.so user != root quiet_success<br \/>\n[\/bash]<\/p>\n<p>Ist DisallowTCP auf false, antwortet der Daemon auf TCP-Anfragen.<\/p>\n<p>[bash]<br \/>\nvi \/usr\/share\/gdm\/gdm.schemas<\/p>\n<p>      security\/DisallowTCP<br \/>\n      b<br \/>\n      false<\/p>\n<p>[\/bash]<\/p>\n<p>&nbsp;<\/p>\n<p>[bash]<br \/>\n\/usr\/share\/gdm# ps aux|grep X<br \/>\nroot      4341  0.0  1.6  41348 35096 tty9     Ss+  Jan25   0:04 \/usr\/bin\/Xorg :0 -br -verbose -audit 0 -novtswitch -auth \/var\/run\/gdm3\/auth-for-Debian-gdm-IV8blH\/database vt9<br \/>\nroot      5513  0.0  0.0   3580   812 pts\/1    S+   14:02   0:00 grep X<br \/>\n[\/bash]<\/p>\n<p>Ist DisallowTCP auf true, antwortet der Daemon nicht (-nolisten tcp) auf TCP-Anfragen.<\/p>\n<p>[bash]<br \/>\nvi \/usr\/share\/gdm\/gdm.schemas<\/p>\n<p>      security\/DisallowTCP<br \/>\n      b<br \/>\n      true<\/p>\n<p>[\/bash]<\/p>\n<p>&nbsp;<\/p>\n<p>[bash][\/bash]<\/p>\n<p>\/usr\/share\/gdm# ps aux|grep X<br \/>\nroot 1194 0.4 1.6 41356 35128 tty7 Ss+ 14:05 0:02 \/usr\/bin\/Xorg :0 -br -verbose -audit 0 -novtswitch -auth \/var\/run\/gdm3\/auth-for-Debian-gdm-HWrLgf\/database -nolisten tcp vt7<br \/>\nroot 1933 0.0 0.0 3580 812 pts\/0 S+ 14:13 0:00 grep X<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cp mit Fortschrittsanzeige [bash] gcp rsync -Pa &lt;source&gt; &lt;destination&gt; [\/bash] HD-Belegung ala Treesize [bash] ncdu [\/bash] jpg Aufl\u00f6sung ver\u00e4ndern [bash] for file in *.JPG; do convert $file -resize 1024&#215;768 -quality 95 1024&#215;768-$file; done [\/bash] pdf-Dateien zusammenf\u00fcgen und\/oder rotieren [bash] pdftk &hellip; <a href=\"https:\/\/www.zerfallskonstante.de\/?p=325\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,9],"tags":[],"class_list":["post-325","post","type-post","status-publish","format-standard","hentry","category-bash","category-linux"],"_links":{"self":[{"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=325"}],"version-history":[{"count":40,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":675,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/posts\/325\/revisions\/675"}],"wp:attachment":[{"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}