基本命令
cd /home/s123 进入硬盘目录
ls 文件列表
rm -f install.log 删除文件
pwd当前目录
chmod 755 xxx 赋予权限755为“读写执行”权限
管线用| 如 ls | grep test?.c | wc -l 以testX.c的文件有几个
ps命令是显示进程 ps -e // pe -ef
加入&为后台运行命令
//-------------------------------shell 编程--------------------
vi test.c
点击i或a进入编辑模式
如
#!bash
date
ps -e
cd /
按下exc计入命令模式
:进入底行模式 w wq 存盘 退出
sh test.c 运行shell文件
第二个shell:
while true
do
date;
sleep 1;
done;
//---------------------------------shell 编程-------------------
cd /home/s123 进入硬盘目录
ls 文件列表
rm -f install.log 删除文件
pwd当前目录
chmod 755 xxx 赋予权限755为“读写执行”权限
管线用| 如 ls | grep test?.c | wc -l 以testX.c的文件有几个
ps命令是显示进程 ps -e // pe -ef
加入&为后台运行命令
//-------------------------------shell 编程--------------------
vi test.c
点击i或a进入编辑模式
如
#!bash
date
ps -e
cd /
按下exc计入命令模式
:进入底行模式 w wq 存盘 退出
sh test.c 运行shell文件
第二个shell:
while true
do
date;
sleep 1;
done;
//---------------------------------shell 编程-------------------