![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
linest00
这个作者很懒,什么都没留下…
展开
-
设置环境变量
[b]临时设置[/b] export PATH=$PATH:路径[b]永久设置[/b] 对所有用户:修改 /etc/profile 加入 export PATH="$PATH:路径"对单个用户:修改 ~/.bashrc 加入 export PATH="$PATH:路径"修改文件后执行 source .bashrc 或重启即可生效用echo $PATH可以检验...原创 2011-10-13 15:56:05 · 71 阅读 · 0 评论 -
磁盘使用
$du -sh /home/linest/* | sort -rn272M /home/linest/mahout145M /home/linest/mrs_std96K /home/linest/all_auction_category.txt60K /home/linest/hive_log48M /home/linest/tools...原创 2011-10-19 13:21:06 · 76 阅读 · 0 评论 -
Shell多行注释
利用here document:表示空语句,这样就实现了多行注释:原创 2011-10-21 15:20:23 · 68 阅读 · 0 评论 -
文档格式
最近用在windows下编写的python脚本进行linux下hive streaming时会报错。文件格式导致诡异错误。在vi下 set ff? 看是否显示为dos如果是dos说明是windows环境下的执行set ff=unix 修改...原创 2011-10-25 18:28:44 · 65 阅读 · 0 评论 -
查看字符ascii值
转自http://blog.csdn.net/emili/article/details/5209119> echo "A" | tr -d "/n" | od -An -t dC 65> echo "X" | tr -d "/n" | od -An -t dC 88> echo "a" | tr -d "/n" | od -An -t d原创 2011-11-01 17:16:34 · 254 阅读 · 0 评论 -
时间获取
常用date参数 备查上下午 %p locale's equivalent of either AM or PM; blank if not known %P like %p, but lower case月、星期 %a locale's abbreviated weekday name (e.g., Sun) %A locale's ful...2011-11-04 13:22:41 · 69 阅读 · 0 评论 -
shell 特殊变量
[linest@036194.sqa.cm4]$ sh test.sh a b c d e$0 return shell nametest.sh$n return nth parameterc$* return all parametersa b c d e$# return the number of parameters5$$ return current ...2011-11-17 14:58:24 · 80 阅读 · 0 评论 -
shell 内部命令和外部命令
(builtin)内部命令是shell解释程序内建的,有shell直接执行,不需要派生新的进程。("external command" or "disk command")外部命令是二进制可执行文件,需要由磁盘装入内存执行。会派生新的进程,shell解释程序会调用fork自身的一个拷贝,然后用exec系列函数来执行外部命令,然后外部命令就取代了先前fork的子shell。...2011-11-17 15:18:12 · 215 阅读 · 0 评论 -
文件统计
wc 命令 -c, --bytes print the byte counts -m, --chars print the character counts -l, --lines print the newline counts -L, --max-line-length print the leng...2011-12-02 12:11:41 · 75 阅读 · 0 评论