- 博客(11)
- 收藏
- 关注
原创 resolution : "tar: Removing leading `/' from member names"
<br />pack tar `tar zcf test.tar.gz /the/original/place` problem displays as:<br /> <br />tar: Removing leading `/' from member names<br /> <br />the resolution is:<br />`cd /the/original/place`<br />`tar zcf test.tar.gz *`
2011-03-23 14:16:00
617
转载 linux shell 检查进程PID
<br />转自:http://www.linuxdiyf.com/viewarticle.php?id=108103<br /> <br />#<br /># check the pid of such program<br />#<br />checkPid() {<br /> if [ -z "`ps x | grep $1 | grep -v grep | grep -v $0 | awk '{print $1}'`" ]; then<br /> echo "
2011-02-28 12:11:00
1524
原创 Multiple process create and delete the same name file conflict
<br />When multiple process create and delete the same name file in the same place in a time, it will cause conflict.<br />For example, if the Process A and Process B both create file named "test.txt" in same place in hadoop hdfs, and A, B both need to del
2011-02-14 17:59:00
683
原创 Brand-new 2011 career & work
Mon., Feb.14th, 2011. My first formal working day for 2011. Expecting my brand-new 2011...
2011-02-14 16:56:00
1399
原创 关于while read line循环的linux bash shell bug
#! / bin / bash while read line do echo-e "$ line / n" done need to add "Here is the link for more detail info:http://en.kioskea.net/faq/1757-how-to-read-a-file-line-by-line
2011-01-25 16:24:00
5627
原创 一般用户的root操作
<br />如果/tmp/test.sh文件是root写权限,非testuser,可以直接在testuser下敲一下命令来执行root删除:<br />[testuser@hostname opt]$su - -c "rm -rf /tmp/test.sh"<br />输入root密码即可。
2011-01-25 11:11:00
499
原创 for与while循环读行及嵌套ssh的区别
有个需求:有三列信息文本,第一列IP,第二列用途,第三列备注,需要登录每个IP执行命令,不符合执行命令结果的,打印出文本中这一行信息。 需求很简单,只要用一个循环,能逐一登录到每台机器,执行命令就可以了,刚开始以为只要5分钟就能搞定的事情,结果花费了我一个上午的时间。主要耽搁在while循环里面嵌套了ssh。 首先说说for跟while读行的区别,如都只有一列,结果是一样的,但是如果多列,比如txt内容这样:line1 line2 line2li
2011-01-25 11:07:00
2638
转载 写给刚毕业的程序员的一点经验教训
<br />写给刚毕业的程序员的一点经验教训:<br /><br /><br />1.如果你进了一家靠关系吃饭的公司,千万不要跟那些你眼中所谓的老板"眼线"过不去,即使你相当的看不惯他,如果他拉拢你<br /> 即使你不想参与他们,你应该客客气气,千万别把大学时一副目中无人,侠义心肠带到职场。<br /><br />2.如果你的公司里有那么几个心高气傲且地位显赫的人存在,那么你得对他客客气气,即使他根本瞧不起你,即使他对你恶语相向,你就当他放屁,不要明着都他斗,<br />
2011-01-14 20:41:00
754
原创 JAVA文件路径特殊字符“/”的处理
<br />在Windows下,JAVA 中文件路径里带有的“/”是特殊字符,需要转义,或者用“//”替换。<br /> <br />例如: <br /> String filePathStr1= "C:/Documents and Settings/Administrator/Desktop";<br /> String filepathStr2 = "C://Documents and Settings//Administrator//Desktop";
2011-01-14 18:57:00
3496
原创 Java执行Shell脚本“No such file or directory”异常的可能原因
用Runtime.getRuntime().exec()方法执行Linux的一个Shell脚本时,报Cannot run program "./script/abc.sh": java.io.IOException: error=2, No such file or directory]java.io.IOException: Cannot run program "./script/abc.sh": java.io.IOException: error=2, No such file or dir
2011-01-13 12:17:00
23679
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人