<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[刚写的热乎乎的复习笔记]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Mon, 12 Nov 2007 07:57:12 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	su &nbsp; &nbsp;:切换并取代该用户的身份<br/> &nbsp; &nbsp;执行范例:<br/> &nbsp; &nbsp;1>切换到root<br/> &nbsp; &nbsp;[lammy198@localhost lammy198]$ su - &nbsp; &nbsp;//可以写成su - root<br/> &nbsp; &nbsp;Password: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//输入密码<br/> &nbsp; &nbsp;[root@localhost root]# <br/> &nbsp; &nbsp;2>切换到lammy198<br/> &nbsp; &nbsp;由root切换,则不需要输入密码<br/> &nbsp; &nbsp;[root@localhost root]# su - lammy198<br/> &nbsp; &nbsp;[lammy198@localhost lammy198]$ <br/> &nbsp; &nbsp;不是由root切换,则需要输入密码<br/> &nbsp; &nbsp;[lammy@localhost lammy]$ su - lammy198 &nbsp; &nbsp;//不可以写成su -<br/> &nbsp; &nbsp;Password: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//输入密码<br/> &nbsp; &nbsp;[lammy198@localhost lammy198]$ <br/>adduser &nbsp; &nbsp;:新建系统上的用户<br/> &nbsp; &nbsp;[root@localhost root]# adduser -D &nbsp; &nbsp; &nbsp; &nbsp;//显示建立帐号时的默认值<br/> &nbsp; &nbsp;GROUP=100 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//所属主组的ID<br/> &nbsp; &nbsp;HOME=/home &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//用户的根目录<br/> &nbsp; &nbsp;INACTIVE=-1<br/> &nbsp; &nbsp;EXPIRE=<br/> &nbsp; &nbsp;SHELL=/bin/bash &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//所使用的SHELL<br/> &nbsp; &nbsp;SKEL=/etc/skel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//所应用的设置文件<br/> &nbsp; &nbsp;创建lammyt的帐号<br/> &nbsp; &nbsp;[root@localhost root]# adduser -m lammyt<br/> &nbsp; &nbsp;[root@localhost root]# id lammyt &nbsp; &nbsp; &nbsp; &nbsp;//为什么groups=502而不是100?<br/> &nbsp; &nbsp;uid=502(lammyt) gid=502(lammyt) groups=502(lammyt)<br/>userdel &nbsp; &nbsp;:删除帐号 &nbsp; &nbsp;<br/> &nbsp; &nbsp;[root@localhost root]# userdel lammyt<br/> &nbsp; &nbsp;[root@localhost root]# id lammyt<br/> &nbsp; &nbsp;id: lammyt: No such user<br/>useradd &nbsp; &nbsp;:新建帐号<br/> &nbsp; &nbsp;[root@localhost root]# useradd lammyt<br/> &nbsp; &nbsp;[root@localhost root]# id lammyt<br/> &nbsp; &nbsp;uid=504(lammyt) gid=504(lammyt) groups=504(lammyt)<br/>who &nbsp; &nbsp;:显示登陆当前登陆用户的信息<br/> &nbsp; &nbsp;[root@localhost root]# who<br/> &nbsp; &nbsp;root &nbsp; &nbsp; :0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sep 16 18:05<br/> &nbsp; &nbsp;root &nbsp; &nbsp; pts/2 &nbsp; &nbsp; &nbsp; &nbsp;Sep 21 12:16 (:0.0)<br/>id &nbsp; &nbsp;:显示拥护组的ID<br/> &nbsp; &nbsp;[root@localhost root]# id -a &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//显示用户的帐户信息<br/> &nbsp; &nbsp;uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)<br/>ps &nbsp; &nbsp;:显示当前系统中由该用户运行的进程列表<br/> &nbsp; &nbsp;[root@localhost root]# ps -ef<br/> &nbsp; &nbsp;UID &nbsp; &nbsp; &nbsp; &nbsp;PID PPID C STIME TTY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TIME CMD<br/> &nbsp; &nbsp;root &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; 0 0 14:38 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:06 init<br/> &nbsp; &nbsp;root &nbsp; &nbsp; &nbsp; &nbsp; 2 &nbsp; &nbsp; 1 0 14:38 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:00 [keventd]<br/> &nbsp; &nbsp;root &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; 1 0 14:38 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:00 [kapmd]<br/> &nbsp; &nbsp;root &nbsp; &nbsp; &nbsp; &nbsp; 4 &nbsp; &nbsp; 1 0 14:38 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:00 [ksoftirqd_CPU0]<br/> &nbsp; &nbsp;root &nbsp; &nbsp; &nbsp; &nbsp; 9 &nbsp; &nbsp; 1 0 14:38 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:00 [bdflush]<br/> &nbsp; &nbsp;root &nbsp; &nbsp; &nbsp; &nbsp; 5 &nbsp; &nbsp; 1 0 14:38 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:00 [kswapd]<br/> &nbsp; &nbsp;root &nbsp; &nbsp; &nbsp; &nbsp; 6 &nbsp; &nbsp; 1 0 14:38 ? &nbsp; &nbsp; &nbsp; &nbsp;00:00:00 [kscand/DMA]<br/>free &nbsp; &nbsp;:查看当前系统内存的使用情况<br/> &nbsp; &nbsp;[root@localhost root]# free<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;total &nbsp; &nbsp; &nbsp; used &nbsp; &nbsp; &nbsp; &nbsp; free &nbsp; &nbsp; &nbsp; shared &nbsp; &nbsp; &nbsp; buffers &nbsp; &nbsp; &nbsp; &nbsp; cached<br/> &nbsp; &nbsp;Mem: &nbsp; &nbsp; &nbsp; &nbsp;412856 &nbsp; &nbsp; 402316 &nbsp; &nbsp; &nbsp;10540 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp;35908 &nbsp; &nbsp; 218360<br/> &nbsp; &nbsp;-/+ buffers/cache: &nbsp; &nbsp; 148048 &nbsp; &nbsp; 264808<br/> &nbsp; &nbsp;Swap: &nbsp; &nbsp; &nbsp; 522104 &nbsp; &nbsp; &nbsp; 1612 &nbsp; &nbsp; 520492<br/>df &nbsp; &nbsp;:查看文件系统的磁盘空间占用情况<br/> &nbsp; &nbsp;[root@localhost root]# df<br/> &nbsp; &nbsp;文件系统 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1K-块 &nbsp; &nbsp; &nbsp; &nbsp;已用 &nbsp; &nbsp; 可用 已用% 挂载点<br/> &nbsp; &nbsp;/dev/sda3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;9653708 &nbsp; 2690872 &nbsp; 6472452 30% / &nbsp; &nbsp;<br/> &nbsp; &nbsp;/dev/sda1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 147766 &nbsp; &nbsp; &nbsp;9376 &nbsp; &nbsp;130761 &nbsp; 7% /boot<br/> &nbsp; &nbsp;none &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;206428 &nbsp; &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp;206428 &nbsp; 0% /dev/shm<br/>du &nbsp; &nbsp;:统计目录或文件所占磁盘空间的大小<br/>fdisk &nbsp; &nbsp;:查看磁盘分区情况及对硬盘进行分区管理<br/> &nbsp; &nbsp;[root@localhost root]# fdisk -l<br/><br/> &nbsp; &nbsp;Disk /dev/sda: 10.7 GB, 10737418240 bytes<br/> &nbsp; &nbsp;255 heads, 63 sectors/track, 1305 cylinders<br/> &nbsp; &nbsp;Units = cylinders of 16065 * 512 = 8225280 bytes<br/><br/> &nbsp; &nbsp; &nbsp; &nbsp;Device Boot &nbsp; &nbsp;Start &nbsp; &nbsp; &nbsp; End &nbsp; &nbsp;Blocks &nbsp; Id System<br/> &nbsp; &nbsp;/dev/sda1 &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp;19 &nbsp; &nbsp;152586 &nbsp; 83 Linux<br/> &nbsp; &nbsp;/dev/sda2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;20 &nbsp; &nbsp; &nbsp; &nbsp;84 &nbsp; &nbsp;522112+ 82 Linux swap<br/> &nbsp; &nbsp;/dev/sda3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;85 &nbsp; &nbsp; &nbsp;1305 &nbsp; 9807682+ 83 Linux <br/> &nbsp; &nbsp;使用fdisk必须拥有root的权限<br/> &nbsp; &nbsp;[lammy@localhost lammy]$ fdisk -l<br/> &nbsp; &nbsp;-bash: fdisk: command not found<br/>mount &nbsp; &nbsp;:磁盘挂载<br/> &nbsp; &nbsp;[root@localhost root]# mount -l &nbsp; &nbsp; &nbsp; &nbsp;//列出以挂载的设备,文件系统名称和挂载点<br/> &nbsp; &nbsp;/dev/sda3 on / type ext3 (rw) [/]<br/> &nbsp; &nbsp;none on /proc type proc (rw)<br/> &nbsp; &nbsp;usbdevfs on /proc/bus/usb type usbdevfs (rw)<br/> &nbsp; &nbsp;/dev/sda1 on /boot type ext3 (rw) [/boot]<br/> &nbsp; &nbsp;none on /dev/pts type devpts (rw,gid=5,mode=620)<br/> &nbsp; &nbsp;none on /dev/shm type tmpfs (rw)<br/> &nbsp; &nbsp;none on /proc/fs/vmblock/mountPoint type vmblock (rw)<br/>cd &nbsp; &nbsp;:更改工作路径<br/> &nbsp; &nbsp;cd -可以回到前次工作目录<br/> &nbsp; &nbsp;./代表当前目录, ../代表上级目录<br/>ls &nbsp; &nbsp;:列出目录内容<br/> &nbsp; &nbsp;[root@localhost /]# ls &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//列出目录<br/> &nbsp; &nbsp;bin &nbsp; dev home &nbsp; &nbsp;lib &nbsp; &nbsp; &nbsp; &nbsp; misc opt &nbsp; root soft &nbsp; &nbsp;tmp var<br/> &nbsp; &nbsp;boot etc initrd lost+found mnt &nbsp; proc sbin themes usr &nbsp; &nbsp;<br/> &nbsp; &nbsp;[root@localhost /]# ls -l &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//列出目录的详细内容<br/> &nbsp; &nbsp;总用量 201<br/> &nbsp; &nbsp;drwxr-xr-x &nbsp; &nbsp;2 root &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp; 4096 9月 5 23:19 bin<br/> &nbsp; &nbsp;drwxr-xr-x &nbsp; &nbsp;4 root &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp; 1024 9月 5 23:07 boot<br/> &nbsp; &nbsp;drwxr-xr-x &nbsp; 20 root &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; 118784 9月 16 18:05 dev<br/> &nbsp; &nbsp;drwxr-xr-x &nbsp; 56 root &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp; 4096 9月 26 21:41 etc<br/> &nbsp; &nbsp;drwxr-xr-x &nbsp; &nbsp;8 root &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp; 4096 9月 26 21:40 home<br/> &nbsp; &nbsp;drwxr-xr-x &nbsp; &nbsp;2 root &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp; 4096 2003-01-25 initrd 后面的没有贴出来<br/>mkdir &nbsp; &nbsp;:创建目录<br/> &nbsp; &nbsp;[root@localhost root]# mkdir -p ./test/test &nbsp; &nbsp; &nbsp; &nbsp;//-p设置路径<br/> &nbsp; &nbsp;[root@localhost root]# ls<br/> &nbsp; &nbsp;gcc_programe minicom.log other test vmware-tools-distrib<br/> &nbsp; &nbsp;[root@localhost root]# cd test<br/> &nbsp; &nbsp;[root@localhost test]# ls<br/> &nbsp; &nbsp;test<br/>cat &nbsp; &nbsp;:连接并显示指定的一个和多个文件的有关信息<br/> &nbsp; &nbsp;-n 由第一行开始对所有输出的行数编号 <br/> &nbsp; &nbsp;-b 和-n相似,只不过对于空白行不编号<br/>cp &nbsp; &nbsp;:将给出的文件或目录复制到另一个文件或目录中<br/> &nbsp; &nbsp;[root@localhost root]# mkdir -p ./test/lammy<br/> &nbsp; &nbsp;[root@localhost root]# cp -a ./test/lammy ./<br/> &nbsp; &nbsp;[root@localhost root]# ls<br/> &nbsp; &nbsp;gcc_programe lammy minicom.log other test vmware-tools-distrib<br/> &nbsp; &nbsp;[root@localhost root]# ls ./test<br/> &nbsp; &nbsp;lammy test<br/>mv &nbsp; &nbsp;:为文件或目录改名或将文件由一个目录移入到另一个目录中<br/> &nbsp; &nbsp;[root@localhost root]# mkdir -p ./test/lammyt<br/> &nbsp; &nbsp;[root@localhost root]# ls ./test<br/> &nbsp; &nbsp;lammy lammyt test<br/> &nbsp; &nbsp;[root@localhost root]# mv -i ./test/lammyt ./<br/> &nbsp; &nbsp;[root@localhost root]# ls<br/> &nbsp; &nbsp;gcc_programe lammy lammyt minicom.log other test vmware-tools-distrib<br/> &nbsp; &nbsp;[root@localhost root]# ls ./test<br/> &nbsp; &nbsp;lammy test<br/> &nbsp; &nbsp;该实例把./test下的lammyt移到./下<br/> &nbsp; &nbsp;[root@localhost root]# mkdir ./lammyt/lammyt<br/> &nbsp; &nbsp;[root@localhost root]# ls ./lammyt<br/> &nbsp; &nbsp;lammyt<br/> &nbsp; &nbsp;[root@localhost root]# mv ./lammyt/lammyt ./lammyt/lammy198<br/> &nbsp; &nbsp;[root@localhost root]# ls ./lammyt<br/> &nbsp; &nbsp;lammy198<br/> &nbsp; &nbsp;重命名实验<br/>rm &nbsp; &nbsp;:删除一个目录中的一个或多个文件<br/> &nbsp; &nbsp;[root@localhost root]# rm -i lammy &nbsp; &nbsp; &nbsp; &nbsp;<br/> &nbsp; &nbsp;rm：是否删除目录‘lammy’? y<br/> &nbsp; &nbsp;rm: 无法删除目录‘lammy’: 是一个目录<br/> &nbsp; &nbsp;[root@localhost root]# rm -r lammy &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//删除单个目录<br/> &nbsp; &nbsp;rm：是否删除目录‘lammy’? y<br/> &nbsp; &nbsp;[root@localhost root]# ls<br/> &nbsp; &nbsp;gcc_programe lammyt minicom.log other test vmware-tools-distrib<br/> &nbsp; &nbsp;该实例说明如果煤油使用-r,则rm不会删除目录;<br/> &nbsp; &nbsp;[root@localhost root]# rm -r test &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//删除多个目录<br/> &nbsp; &nbsp;rm：是否进入目录‘test’? y<br/> &nbsp; &nbsp;rm：是否删除目录‘test/test’? y<br/> &nbsp; &nbsp;rm：是否删除目录‘test/lammy’? y<br/> &nbsp; &nbsp;rm：是否删除目录‘test’? y 
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] 刚写的热乎乎的复习笔记]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>