7 private links
placement new syntax
valgrind can run a gdb server so that a gdb can interact with it. valgrind has 2 options to trigger that:
--vgdb=yes,
--vgdb-error=0.
This second option tells valgrind it needs to wait for that many errors before freezing and wait for a gdb to connect. Setting it to 0 will make valgrind to wait for gdb to connect before executing the program.
valgrind --vgdb=yes --vgdb-error=0 ./foo
gdb ./foo
(gdb) target remote | vgdb
Linux command shelf is a quick reference guide for all linux user who wish to learn linux commands. Commands are divided into 15 categories , which would be more easier to understand what commands to be used in specific requirement. The pdf format of linux command shelf is also available
lsof -nPi tcp:80
sed '/test/{/error|critical|warning/d}' somefile
!:1-3
shopt -s autocd
nocache <I/O-heavy-command>
lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@=split/\s+/; print "\"$[0]\" -> \"$\"\n" for split/,/,$[3]}print "}"' | dot -Tpng | display -
strace -e write=1,2 -p $PID 2>&1 | sed -un "/^ |/p" | sed -ue "s/^.{9}(.{50}).+/\1/g" -e 's/ //g' | xxd -r -p
strings /dev/mem|less
command !(regexp to remove from matching)
Note: This is a feature of bash, and it only works if you've enabled 'extglob' (Extended Pattern Matching):
shopt -s extglob
ifconfig | convert label:@- ip.png
ctrl-x e
Next time you are using your shell, try typing ctrl-x e (that is holding control key press x and then e). The shell will take what you've written on the command line thus far and paste it into the editor specified by $EDITOR. Then you can edit at leisure using all the powerful macros and commands of vi, emacs, nano, or whatever.
disown -a && exit
arecord -f cd | ssh -C user@host aplay -f cd
or the other way around
ssh -C user@host arecord -f cd | aplay -f cd
commandlinefu.com is the place to record those command-line gems that you return to again and again.