Linux命令
lionfun
这个作者很懒,什么都没留下…
展开
-
mount(手工挂载/自动挂载)问题
<br />1.vfat文件编码方式<br /> fat32文件名分为两种,短文件名和长文件名<br /> 两种文件名在磁盘上的存储方式是不同的,长文件名在目录项中特殊的标记<br /> 短文件名也就是8.3格式,对于包含中文的任何文件来说都不可能是短文件名<br /> mount挂载时默认将其变成小写,你可以加-o shortname=winnt来使其和<br /> win2k/xp一致<br /> 长文件名都是unicode的,以utf16格式存储 <br /><br />2.codepag转载 2010-12-23 12:35:00 · 3706 阅读 · 0 评论 -
sed r命令使用
sed中的r命令会把其后面的任何字符判读为文件名,直到回车符或是单引号,一般对r命令的写法有下面的几种:sed /pattern/{r file1other cmd} file # 因为这里里面使用了{},所以可以添加其它命令 sed /pattern/ r file1 file sed -e /pattern/{r file1 -e other c原创 2011-06-13 01:22:00 · 11050 阅读 · 0 评论 -
重定向Bash命令——time
前言: 由于需要获得一个程序的运行时间,我们可以在Shell里简单地调用time command的形式来获取一个程序运行的real, user, system等时间信息,但是默认输出的形式类似: real 0m0.077s user 0m0.077s sys 0m0.077s假定我们只关心用户态时间,那么可以直接使用time command转载 2011-06-20 20:02:00 · 1253 阅读 · 0 评论 -
linux find 命令避开某个目录的用法prune
如果想查找当前目录(/home/student)下的tmp.txt文件,但是想要避开sep目录:find /home/student -path /home/student/sep -prune -o -name "tmp.txt" -printsep后面不能加/ 即/home/student/sep/是错误的如果当前目录为/home/student 也可以这样find . -path ./sep -prune -o -name "tmp.txt" -print总结:-path 只是匹配find出来的路径,原创 2011-04-29 11:48:00 · 18167 阅读 · 0 评论