BLOG

How do I get the parent process ID of a given child process?

https://askubuntu.com/questions/153976/how-do-i-get-the-parent-process-id-of-a-given-child-process https://superuser.com/questions/150117/how-to-get-parent-pid-of-a-given-process-in-gnu-linux-from-command-line/544696#544696

Read More

perf: Linux profiling with performance counters

https://perf.wiki.kernel.org/index.php/Tutorial#Attaching_to_a_running_process

Read More

A bit field is a data structure used in computer programming

https://en.wikipedia.org/wiki/Bit_field

Read More

Search for a pattern at the beginning of a line using grep

$ps -e “kworker$” error: unknown sort specifier Usage: ps [options] Try ‘ps –help ‘ or ‘ps –help ‘ for additional help text. For more details see ps(1). $ps -ef | grep “^daemon” daemon 639 1 0 May04 ? 00:00:00 /usr/sbin/atd -f $ps -ef | grep “^rtkit” rtkit 1245 1 0 May04 ? 00:00:00 /usr/lib/rtkit/rtkit-daemon $ps …

Read More

why does “exit status 0” mean success?

https://www.quora.com/in/Why-does-%E2%80%9Cexit-status-0%E2%80%9D-mean-success

Read More

tinkering with trap and exit commands

$echo $? 0 $echo $? 0 $exit 10 | tee solve.txt $cat solve.txt $rm solve.txt $exit 10 | echo $? 0 $exit -1 | echo $? 0 $exit -1 | echo $? 0 $false | true $echo $? 0 $false $echo $? 1 $true $echo $? 0 $exit 5 | tee var=$? $file var\=0 var=0: …

Read More

Indicate how each name would be interpreted if used as a command name

$type -a locate locate is /usr/bin/locate $type -a ls ls is aliased to `ls –color=auto’ ls is /bin/ls $type -t ls alias $type -t locate file $type -t /dev/urandom $type -t /dev/sda1 $type -t urandom $type -t sda1 $type -t type builtin $type -t shuf file $type -t bash file $type -t proc $type -t …

Read More

Non-deterministic Algorithms

https://cs.nyu.edu/courses/spring03/G22.2560-001/nondet.html

Read More

sort – sort lines of text files

$cat test.txt sept aug jan dec oct apr feb mar11 mar1 $sort test.txt apr aug dec feb jan mar1 mar11 oct sept $sort -M test.txt jan feb mar1 mar11 apr aug sept oct dec $

Read More

What is Tracker?

https://wiki.gnome.org/Projects/Tracker/WhatIsTracker

Read More