Monday, February 26, 2007

Pack200

It's really a hard thing to implement :-(
By now, I just remeber 2 things about the specification detail.
The bytecode renumbering, and attribute layout definition.
But, what's them, I do not know.

Install PadWalker for EPIC

PadWalker is a module which allows you to inspect (and even change!)
lexical variables in any subroutine which called you. It will only show
those variables which are in scope at the point of the call.

PadWalker is particularly useful for debugging. It's even used by
Perl's built-in debugger. (It can also be used for evil, of course.)

prerequisite(WinXP):
PadWalker source: PadWalker-1.5.tar.gz
DotNet 2003 express
ActiveState perl port 5.8.8

1. download it from CPAN(http://search.cpan.org/dist/PadWalker/).
2. unzip and extract it to \lib
3. exec perl Makefile.pl
4. nmake;nmake test;nmake install

Friday, February 16, 2007

sudo, write, talk, mesg & others

sudo let user to execute command in root privillege with out root passwd, when user input correct passwd of him/her/it self. There is only prerequisite: user must be configured in /etc/sudoers.
Common options of sudo is -l, -v, -K.
user should use visudo to edit etc/sudoers. visudo will choose editor according to EDITOR variable.

write, talk are used to send msg to other user. mesg is a switch, when invoked as mesg n, it will disable any msg sent except root.

wall = write all

etc/motd
etc/issue

Wednesday, February 14, 2007

su stands for substitute but not super

How to be a super user in UNIX? I know 2 ways - login as super or su
How to return to normal? 'exit', yes. '^D', yes. And 'suspend'. I prefer this one. Since I can play around by typing 'fg' - 'suspend' - 'fg' ...

Login shell: you can guess the meaning from its name. It will use /etc/profile ,~/.bash_profile, /etc/bashrc, ~/.bashrc
On the other hand non - login shell use only the former 2 files. That's the distinction I just know about profile and bashrc. When runing 'su -', it indeed means 'su -l'/'su --login'. I now know the magic under the hook.

What needs mentioning is 'passwd' & 'xscreensaver'. On RH linux, the former is used to change user password and the later is used to invoke x server screen saver.