Debian bash Allerlei

cp mit Fortschrittsanzeige
[bash]
gcp
rsync -Pa <source> <destination>
[/bash]

HD-Belegung ala Treesize

[bash]
ncdu
[/bash]

jpg Auflösung verändern

[bash]
for file in *.JPG; do convert $file -resize 1024×768 -quality 95 1024×768-$file; done
[/bash]

pdf-Dateien zusammenfügen und/oder rotieren

[bash]
pdftk Datei01.pdf Datei02.pdf Datei0x.pdf cat output Datei01-0x.pdf
[/bash]

Seite 13 aus 20 seitigem Dokument entfernen

[bash]
pdftk Datei20.pdf cat 1-12 14-end output Datei20-13.pdf
[/bash]

gesamte Datei (1-end) um 180° (South) rotieren
(North|South|East|West|Left|Right|Down)

[bash]
pdftk in.pdf cat 1-endS output out.pdf
[/bash]

Public Key eines Repositories importieren

[bash]
gpg –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys
[/bash]

Eine beliebig große Dummy-Datei erzeugen
Im Beispiel wird eine 10 MB große Datei dummy_10MB.txt erzeugt.

[bash]
dd if=/dev/urandom of=dummy_10MB.txt bs=1M count=10
[/bash]

ISO-Datei erstellen

[bash]
dd if=/dev/cdrom of=~/cdrom_image.iso
[/bash]

ISO-Datei von einem Verzeichnis erstellen

[bash]
genisoimage -o directory_image.iso /verzeichnis/
[/bash]

ISO-Datei mounten

[bash]
mount -o loop .iso /
[/bash]

Wenn es mal etwas zu kompilieren gibt:

[bash]
apt-get install build-essential
[/bash]

Systemweite Variablen setzen:

[bash]
vi /etc/profile

export =
[/bash]

 

[bash]
export http_proxy=http://:
export https_proxy=http://:
[/bash]

==MULTIMEDIA==

mms:-URL extrahieren

[bash]
curl VIDEO-URL | grep mms: | cut -d \" -f 2 | xargs -n1 mplayer -dumpstream -dumpfile DATEINAME.wmv
[/bash]

.flac in .mp3 konvertieren

[bash]
apt-get install lame libavcodec-extra-53
[/bash]

 

[bash]
#!/bin/sh
for FILE in *.flac;
do
ffmpeg -i "$FILE" -ab 320k -map_meta_data 0:0 "${FILE%.*}.mp3";
done
[/bash]

oder so

[bash]
for f in *.flac; do ffmpeg -i "$f" -ab 320k "${f%.flac}.mp3"; done
[/bash]

.ts in .avi konvertieren

[bash]
ffmpeg -i <input type="text" />.ts -vcodec libxvid -b 2000k -acodec libmp3lame -ac 2 -ar 44100 -ab 192 <output>.avi
[/bash]

.ts in .mp4 kovertieren

[bash]
ffmpeg -i ./video.wmv -vcodec libx264 -preset slow -crf 22 -acodec copy /home//Videos/video.mkv
[/bash]

 

[bash]
ffmpeg -i /home//Videos/04.ts -vcodec libx264 -level 12 -b 128k -r 25 -bt 144k -s 240×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
[/bash]

—————————————————————-

Vorlesungs-Video
http://www.j3l7h.de/videos.html

ffmpeg-URLs
target=“01″>
target=“02″>
target=“03″>
target=“04″>
target=“05″>
target=“06″>
target=“07″>

Debian WiFi-Setup:
http://www.cyberciti.biz/faq/debian-linux-wpa-wpa2-wireless-wifi-networking/

Remote root Gnome-login:

[bash]
vi /etc/gdm3/daemon.conf

[security]
AllowRoot=true
[/bash]

 

[bash]
vi /etc/pam.d/gdm3
[/bash]

Kommentar entfernen

[bash]
auth required pam_succeed_if.so user != root quiet_success
[/bash]

Ist DisallowTCP auf false, antwortet der Daemon auf TCP-Anfragen.

[bash]
vi /usr/share/gdm/gdm.schemas

security/DisallowTCP
b
false

[/bash]

 

[bash]
/usr/share/gdm# ps aux|grep X
root 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
root 5513 0.0 0.0 3580 812 pts/1 S+ 14:02 0:00 grep X
[/bash]

Ist DisallowTCP auf true, antwortet der Daemon nicht (-nolisten tcp) auf TCP-Anfragen.

[bash]
vi /usr/share/gdm/gdm.schemas

security/DisallowTCP
b
true

[/bash]

 

[bash][/bash]

/usr/share/gdm# ps aux|grep X
root 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
root 1933 0.0 0.0 3580 812 pts/0 S+ 14:13 0:00 grep X

Dieser Beitrag wurde unter bash, Linux veröffentlicht. Setze ein Lesezeichen auf den Permalink.