Useful cmds under Linux

1. 'nm', 'eu-readelf' and 'c++filt'

 Example code:

[user@forever cpp]$ g++ test1.cpp -o test1.exe

[user@forever cpp]$ nm test1.exe | grep Fun
0804872a W _ZN4Test3FunEiPKc

[user@forever cpp]$ eu-readelf -a test1.exe | grep Fun
   75: 0804872a     76 FUNC    WEAK   DEFAULT       12 _ZN4Test3FunEiPKc

[user@forever cpp]$ c++filt _ZN4Test3FunEiPKc
Test::Fun(int, char const*)


2. tar

$ tar czvf test.tar.gz test

$ tar cjvf test.tar.bz2 test

$ tar zxvf test.tar.gz

$ tar jxvf test.tar.bz2

3. 'rpm2cpio' and 'cpio'

$ rpm2cpio XXX.rpm | cpio -id

4. screen

創建一個session

$ screen -dmS session_name -t title

重新連接session

$ screen -r session_name

連接非斷開模式的session

$ screen -x session_name

5. 'whatis' and 'apropos'

whatis  - search the whatis database for complete words.

apropos - search the whatis database for strings.

man -f     Equivalent to whatis.

man -k     Equivalent to apropos.

$ man -f pty
pty                  (7)  - pseudo-terminal interfaces

$ man -k pty
cleanlinks           (1x)  - remove dangling symbolic links and empty directories
forkpty [openpty]    (3)  - tty utility functions
login_tty [openpty]  (3)  - tty utility functions
open_init_pty        (8)  - run an program under a psuedo terminal
openpty              (3)  - tty utility functions
posix_trace_eventset_empty [posix_trace_eventset_add] (3p)  - manipulate trace event type sets (TRACING)
pty                  (7)  - pseudo-terminal interfaces
rmdir                (1)  - remove empty directories
sigemptyset          (3p)  - initialize and empty a signal set
sigemptyset [sigsetops] (3)  - POSIX signal set operations

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章