pwdx – report current working directory of a process

A UNIX Command $pwdx 3805 1413 1412 1799 1009 2002 3805: /home/jeffrin 1413: Permission denied 1412: Permission denied 1799: Permission denied 1009: Permission denied 2002: Permission denied $ $sudo pwdx 3805 1413 1412 1799 1009 2002 [sudo] password for jeffrin: 3805: /home/jeffrin 1413: / 1412: /var/lib/mysql 1799: / 1009: / 2002: / $ UNIX Explanation …

id – print real and effective user and group IDs

A UNIX Command $id uid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),1001(wireshark) $id -n id: cannot print only names or real IDs in default format $id -a uid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),1001(wireshark) $id -g 1000 $id -G 1000 29 1001 $id -Gn jeffrin audio wireshark $id -r id: cannot print only names or real IDs in default format $id -rG 1000 29 …

coreutils: ls –quoting-style=c and | (pipe) symbol

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432945 output of ls –quoting-style=c is incorrect when filename contains | (pipe) symbol. Steps: mkdir /tmp/bla touch “/tmp/bla/filename with | pipe” ls –quoting-style=c /tmp/bla returns: “filename with \| pipe” thanks, -Mathieu Ref: http://groups.google.com/group/comp.lang.c/browse_thread/thread/0db8070def6a4453

coreutils: join outputs wrong field order for -v option

join – join lines of two files on a common field http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410270 Package: coreutils Version: 5.97-5 Severity: normal the join field is incorrect for the -v version. #08-Thu-20-03-40 /tmp$ cat>|a #a1,a2,c3,a4,a5 #a21,a22,a33,a44,a55 #08-Thu-20-05-07 /tmp$ cat>|b #b1,b2,b3,c3,b5 #b21,b22,b33,b44,b55 #08-Thu-20-06-07 /tmp$ join -t, -i -1 3 -2 4 a b #c3,a1,a2,a4,a5,b1,b2,b3,b5 #08-Thu-20-06-10 /tmp$ join -v 2 -t, …

coding standard related work for Linux kernel code using checkpatch.pl tool

$git fetch origin $ $./scripts/checkpatch.pl –file –terse sound/sound_core.c | more sound/sound_core.c:71: ERROR: trailing whitespace sound/sound_core.c:83: ERROR: trailing whitespace sound/sound_core.c:85: ERROR: trailing whitespace sound/sound_core.c:115: ERROR: open brace ‘{‘ following struct go on the same line sound/sound_core.c:123: WARNING: externs should be avoided in .c files sound/sound_core.c:126: WARNING: externs should be avoided in .c files sound/sound_core.c:155: ERROR: do …

What is an Unevictable LRU Infrastructure ?

RELATED TO Unevictable The Unevictable LRU infrastructure addresses the following classes of unevictable pages: + page owned by ram disks or ramfs + page mapped into SHM_LOCKed shared memory regions + page mapped into VM_LOCKED [mlock()ed] vmas Least Recently Used (LRU): discards the least recently used items first. This algorithm requires keeping track of what …

a simple hack related to xargs

$ls robinsons.iso $ls | grep robinsons.iso | xargs rm $ls robinsons.iso ls: cannot access robinsons.iso: No such file or directory $ xargs – build and execute command lines from standard input This manual page documents the GNU version of xargs. xargs reads items from the standard input, delimited by blanks (which can be protected with …

pinky – lightweight finger

$pinky Login Name TTY Idle When Where jeffrin Jeffrin Jose *tty7 00:28 2010-09-27 15:33 :0 jeffrin Jeffrin Jose *pts/0 2010-09-27 15:40 :0.0 jeffrin Jeffrin Jose pts/1 2010-09-27 16:00 :0.0 $pinky jeffrin Login Name TTY Idle When Where jeffrin Jeffrin Jose *tty7 00:28 2010-09-27 15:33 :0 jeffrin Jeffrin Jose *pts/0 2010-09-27 15:40 :0.0 jeffrin Jeffrin Jose …

signal “expose-event”

g_signal_connect . The second argument for this function is detailed_signal : a string of the form “signal-name::detail”. source :http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html GtkWidget is the base class for all widgets. “expose-event” is an signal and the signal list is available at http://library.gnome.org/devel/gtk/unstable/GtkWidget.html