Archive for the ‘Linux Kernel’ Category

h1

write a message to a particular user through terminal

April 21, 2010

We use wall to broadcast any message to all users logged in at any point of time through terminal

We can use ‘write’ command to send or write a message to a particular user through terminal.


root@server1056 [/root]# w
18:23:38 up 22 days, 17:03, 3 users, load average: 0.47, 0.22, 0.12
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 1x.3x.7x.53-sta 17:48 0.00s 0.06s 0.06s -bash
root pts/3 12x.16x.6x.138 16:14 40:29 0.19s 0.19s -bash
obama pts/4 adsl-7x-4x-1x-18 Mon18 47:18m 0.00s 0.01s sshd: obama [priv]


root@server1056 [/root]# write obama pts/4

hey bud, please call me, I lost your no. since my cell was stolen.

root@server1056 [/root]#

After typing “write obama pts/4” as the command hit enter key once,

then type your message and hit your enter key once to push the message.

then hit ctrl+d to exit out of the write session.

Advertisements
h1

Kernel Patching in Linux

June 1, 2006

Patching the Kernel
#####################

Normal patching produre:
————————-

tar xjf linux-2.6.11.tar.bz2
cd linux-2.6.11
patch -p1 < ../path_to_patch

Then config & compile as normal.

Are you sure the patch file is a tar.bz2 and not just a .bz2? You’ll
likely have to uncompress the patch file, since I don’t know if GNU
patch decompresses automatically…

The “-p1” option tells “patch” to ignore the text before the first /
in paths mentioned in the patch. You need to do this because the first
path component will be the directory the patch author was keeping his
kernel in, which is not relevant.

another shortcut is to do something like this:
——————————————–

bzcat patch.bz2 | patch -p1

or

tar -jxvf patch.bz2 | patch -p1

This works the same as the earlier post, assuming you are using a bz2
zipped patch. If you are using one that is gzipped, you can use gzcat,
or tar -zxvf . You can look at the man page for tar to see what those
flags do. With either of those you are just piping the output of the
first command (patches are plain text, usually compressed in some way,
but not always), to ths second command.

INFO
#####

the information for patching the kernel and all the other install stuff
can be found in the file README.INSTALL. Basically, for patching the
kernel, you cd to your kernel source directory (something like
/usr/src/linux or /usr/src/linux-2.4.18) and enter

patch -p1 < /path/to/patchfile

No output means success here, as usual. Then you do the usual steps to
configure/make/install your kernel.