Differneces between Unix-like systems
Table of Contents
1. UNIX-like 系统的一些不同
表 1 列出了 UNIX-like 系统的一些不同
TASK | Linux | AIX | Solaris | OSX |
---|---|---|---|---|
Default C/C++ compiler | gcc/g++ | xlc/xlC | cc/CC | clang/clang++ |
Debugger | gdb | dbx | mdb (Solaris Modular Debugger) | lldb |
Shard library dependencies | ldd | ldd | ldd | otool -L |
Library path | $LD_LIBRARY_PATH | $LIBPATH | $LD_LIBRARY_PATH | $DYLD_LIBRARY_PATH |
Tracing utility | strace | truss | truss | dtruss |
Hardware configuration | lshw/lsusb/... | prtconf | prtconf -v | hostinfo |
Determine 32 or 64 | arch/uname -m | getconf KERNEL_BITMODE | isainfo -b | uname -a |
更多其它 UNIX-like 系统的差异可参考:http://bhami.com/rosetta.html
2. Portability Tips
pgrep
is not available in AIX by default.
whoami
is not available in Solaris by default.