Skip to content

Linux

Miscellaneous Linux notes and tricks.

Interesting commands

  • od (e.g. od -Ax -tcz)
  • seq

Bookmarks

Scripts

Nice one (from Debian):

cat /usr/bin/xpdf
#!/bin/bash
LANG=C
LC_ALL=C
export LANG LC_ALL
exec -a xpdf xpdf.bin "$@"

Creat single flac with embedded cue sheet

cdparanoia -v [00:00:00.00]-
cdrdao read-toc --fast-toc cdda.toc
ln -s cdda.wav data.wav
cdrdao read-cddb cdda.toc
sed -i 's/data.wav/cdda.wav/g' cdda.toc
toc2cue cdda.toc cdda.cue
flac --cuesheet=cdda.cue cdda.wav 

Funny Bash command

:(){:|:&};:

Capturing Input and Output of a Process with GDB

$ tty
/dev/pts/13
$ gdb --pid=`pidof mutt`
(gdb) call close(0)
(gdb) call close(1)
(gdb) call close(2)
(gdb) call open("/dev/pts/13", 2, 0)
(gdb) call dup(0)
(gdb) call dup(0)
(gdb) detach

bash1

Other stuff

created: 2008-05-15, updated: 2019-10-16