Linux 最佳实践 读书总结
1> 使用CDPATH设置 cd 命令的工作目录
[ramesh@dev-db ~]# pwd
/home/ramesh
[ramesh@dev-db ~]# cd mail
-bash: cd: mail: No such file or directory
[注意:在当前目录下寻找MAIL目录]
[ramesh@dev-db ~]# export CDPATH=/etc
[ramesh@dev-db ~]# cd mail /etc/mail
[注意:这是在/etc下寻找MAIL目录]
[ramesh@dev-db /etc/mail]# pwd
/etc/mail
想要这个设置永久生效, 把export CDPATH=/etc 添加到你的.bash_profile中。
2> 使用cd 别名(alias)来更有效的返回上层目录
# mkdir -p /tmp/very/long/directory/structure/that/is/too/deep
# cd /tmp/very/long/directory/structure/that/is/too/deep
# pwd /tmp/very/long/directory/structure/that/is/too/deep
# cd ../../../../
添加如下
alias cd1="cd .."
alias cd2="cd ../.."
alias cd3="cd ../../.."
alias cd4="cd ../../../.."
alias cd5="cd ../../../../.."
到你的.bash_profile中后,就可以如下回到上层/上上层/上上上层目录了 :)
# cd /tmp/very/long/directory/structure/that/is/too/deep
# cd4
# pwd
/tmp/very/long/directory/structure/
相关文档:
软件包:
httpd-2.23
下载地址
http://apache.justdn.org/httpd/httpd-2.2.3.tar.gz
apr-1.27
apr-util-1.27
http://apache.justdn.org/apr/,版号自已找,最好和我的所提供的版本号一样
Oracle Berkeley DB 4.0.14
下载地址
http://download.oracle.com/berkeley-db/db-4.0.14.tar.gz
subversion-1.4.0
下载地址
......
我们在网络编程的时候经常要检测系统是否得到了有效的IP,是否可以正确联通到网络里面。通常的检查方法就是使用PING命令。
而在程序里面如何自动让程序知道哩?有两种办法,
一种是利用系统的能力,直接调用系统的shell,如方法一就可以在linux系统中很好使用。
另外一种是直接在代码里面实现ping命令,通过调用函数的形式 ......
注:请允许我转载您的佳作
在windows上开发能够在linux上编译的C代码,我查了查有2个软件可以实现,一个是Cygwin,一个是mingw。其中cygwin是一个windows上linux环境的模拟工具,他提供了很多linux工具的windows实现版本,例如vi,emacs等等,当然也包括GCC。使用mingw的好处就是编译过的程序直接就可以跑了,而cygwin则需 ......
Integrated Development Environments / RAD tools / GUI-builders on Linux:
General/Editors:
Amy (HTML, C, C++, Java, SQL, LaTeX, Makefiles and many more languages)
blIDE (incomplete; no downloads as of yet)
IBM's Eclipse (an extensible IDE kit; Java, C/C++, plus other languages via plug-ins t ......
http://inthirties.com:90/thread-1228-1-1.html
一、分区方式
1.创建swap分区,例如:
# fdisk /dev/sdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-13054, default 1):
Using default value 1
Last cylinder o ......