liunx 常用命令

1、关键字:
    whereis 

例如:whereis hive 则是找出hive 环境变量配置在哪。


2、$PATH  在shell 变量中,不能出现$PATH 定义,不然会将系统环境变量PATH 覆盖,导致其他命令找不到。

3、赋权 chmod +x   xx.sh

4、shell 读取文件行数
   $file_path =text.txt

function read(){
  while read LINE
   do
     echo $LINE
  done <$file_path
}


猜你喜欢

转载自tongjun-zhou.iteye.com/blog/2383360