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
相关文档:
http://linux.chinaitlab.com/administer/774036.html
[ 起源 ]Linux/Unix下守护进程(Daemon)大家都知道,比如我们常用的httpd、mysqld等等,就是常驻内存运行的程序,类似于Windows下的服务。一般守护进程都是使用C/C++来写,就是通过fork生成子进程,当前台shell下的父进程被杀掉,子进程就转到后台运行,为了不 ......
version: 1.0
date:20090721
Author:crifan
Mail:green-waste(At)163.com
上接:【简介】如何编写linux下nand flash驱动-1
http://green-waste.blog.163.com/blog/static/3267767820096221127554/
【读(read)操作过程详解】
以最简单的read操作为例,解释如何理解时序图,以及将时序图
中的要求,转化 ......
1、
将文件checkout到本地目录
svn
checkout
path(path是服务器上的目录)
例如:svn
checkout svn
://192.168
.1.1
/pro/domain
简写:svn
co
2、
往版本库中添加新的文件
svn
add
file
例如:svn
add test.php(添加test.php)
svn
add *.php(添加当前目录下所有的php文件)
3、
将改动 ......
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))发送接收以太 ......