Posts

Showing posts from May, 2012

[Level 2] How to know python module come from.

python> print sys.modules {'copy_reg': <module 'copy_reg' from '/usr/lib/python2.6/copy_reg.pyc'>, 'encodings': <module 'encodings' from '/usr/lib/python2.6/encodings/__init__.pyc'>, 'site': <module 'site' from '/usr/lib/python2.6/site.pyc'>, '__builtin__': <module '__builtin__' (built-in)>, '__main__': <module '__main__' (built-in)>, 'encodings.encodings': None, 'abc': <module 'abc' from '/usr/lib/python2.6/abc.pyc'>, 'posixpath': <module 'posixpath' from '/usr/lib/python2.6/posixpath.pyc'>, 'errno': <module 'errno' (built-in)>, 'encodings.codecs': None, '_abcoll': <module '_abcoll' from '/usr/lib/python2.6/_abcoll.pyc'>, 'types': <module 'types' from '/usr/lib/python2.6/types.pyc'>, '_code...

[Level 1] get ssh finger print

$ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub 2048 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff /etc/ssh/ssh_host_rsa_key.pub Wish this helps. regards, Stanley Huang

[Level 1] autocomplete in shell script

#!/bin/bash read -e -p 'input file name ( for auto complete): ' input_file echo $input_file $ ./autocomplete.sh input file name ( for auto complete): /etc/ho<tab> input file name ( for auto complete): /etc/host<enter> /etc/host $ Wish this helps. regards, Stanley Huang