sh 在linux运用

2013-08-30 00:00:00 by 【6yang】, 708 visits, 收藏 | 返回
1.touch hello.sh 
2.vim hello.sh 
键入i 插入#!/bin/sh echo hello world; 
键入: esc : wq 
3.chmod 700 hello.sh //修改权限后就可以运行此命令
4. 执行./hello.sh

或 chg2apache.sh

#!/bin/sh
sudo chown jack -R $1
sudo chmod g+w -R $1

保存后,即可运行 chg2apache hello.txt,即可修改此文件的属性。
分享到:
share

    图片原图

    loading

    loading