易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux终端提示符PS1设置(颜色)


\d :代表日期,格式为weekday month date,例如:"Mon Aug 1"
\H :完整的主机名称。例如:我的机器名称为:fc4.linux,则这个名称就是fc4.linux
\h :仅取主机的第一个名字,如上例,则为fc4,.linux则被省略
\t :显示时间为24小时格式,如:HH:MM:SS
\T :显示时间为12小时格式
\A :显示时间为24小时格式:HH:MM
\u :当前用户的账号名称
\v :BASH的版本信息
\w :完整的工作目录名称。家目录会以 ~代替
\W :利用basename取得工作目录名称,所以只会列出最后一个目录
\# :下达的第几个命令
\$ :提示字符,如果是root时,提示符为:# ,普通用户则为:$
    CentOS中关于这些:
\a     an ASCII bell character (07)
\d     the date in "Weekday Month Date" format (e.g., "Tue May
                     26")
\D{format} the format is passed to strftime(3) and the result is
inserted into the prompt string; an empty format results in a
locale-specific time representation. The braces are required
\e     an ASCII escape character (033)
\h     the hostname up to the first ‘.’
\H     the hostname
\j     the number of jobs currently managed by the shell
\l     the basename of the shell’s terminal device name
\n     newline
\r     carriage return
\s     the name of the shell, the basename of $0 (the portion
                     following the final slash)
\t     the current time in 24-hour HH:MM:SS format
\T     the current time in 12-hour HH:MM:SS format
\@     the current time in 12-hour am/pm format
\A     the current time in


相关文档:

LINUX CVS添加用户shell

vi adduser.sh 然后把如下代码贴入。保存到CVSROOT目录下。
#!/bin/bash
#add cvs users
while [ -n "$(echo $1|grep '^_')"];
do
case $1 in
-u) param=$2
echo -e "$param:\c" >>passwd
shift ;;
-p) param=$2
echo -e `./passwdgen.pl $param`":cvsroot" >> passwd;;
*)
exit 1
esac
shift
......

linux dns 配置

 ①简介
  DNS就是Domain Name System,它能够把形如www.21php.com这样的域名转换为211.152.50.35这样的IP地址;没有DNS,浏览21php.com 这个网站时,就必须用211.152.50.35这么难记的数字来访问。提供DNS服务的就是DNS服务器。DNS服务器可以分为三种,高速缓存服务器 (Cache-only server)、主服务器(Primary Name serv ......

linux sock_raw原始套接字编程

sock_raw原始套接字编程可以接收到本机网卡上的数据帧或者数据包,对与监听网络的流量和分析是很有作用的.一共可以有3种方式创建这种socket
 
1.socket(AF_INET, SOCK_RAW, IPPROTO_TCP|IPPROTO_UDP|IPPROTO_ICMP)发送接收ip数据包
2.socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP|ETH_P_ARP|ETH_P_ALL))发送接收以太 ......

Linux虚拟机安装VMware Tools

Linux虚拟机下安装VMware Tools
VMware Tools所在位置:
VMware 安装路径
\VMware\VMwareWorkstation\linux.iso
1.修改root用户密码
10:32:36 zhangzhen@zhangzhen-desktop:~$ sudo passwd root
[sudo] password for zhangzhen:
输入新的 UNIX 口令:
重新输入新的 UNIX 口令:
passwd:已成功更新密码
10:33 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号