Linux入门笔记五
Shell脚本及其成分
Shell是一个功能强大的编程语言。用Shell编写的批处理文件称为Shell脚本、
Shell脚本的成分
-注释部分
以#开头的行
-命令
在Shell脚本中可以出现任何在交互方式下可以使用的命令
-变量
既可以使用用户自定义的变量,也可以使用系统环境变量
-流程控制
对命令的执行流程进行控制(顺序、分支、循环)
练习
more /etc/httpd/
vi hello
ls
date
whoami
pwd
date;whoami;pwd
在hello里写上
#/bin/bash
#this script is display current user,time and path
#it is display current time
echo "current time is"
date
#it is display current user
echo "current user is"
whoami
#it is display current path
echo "current path is"
pwd
执行bash hello
练习
ls -l
-rwxr-xr-- Root IT abctxt
Root 作为所有者 看前三项 rwx
执行chmod u+x hello
ls -l hello
IT 作为所有组 看中间三项 r-x
其他所有组 看后三项 r--
常见的环境变量
HOME 用户主目录
PATH 命令搜索路径
PS1 命令提示符号
PWD 用户当前工作路径
SHELL 用户shell类型
TERM 终端类型
LANG 语言环境
x=abc
echo x
echo $x
x=asdfsaf
echo $x
echo $SHELL
echo $PATH
修改环境变量
PATH=$PATH:/root
echo $hello
相关文档:
学习Linux终端命令
linux目录架构
/ 根目录
/bin 常用的命令 binary file 的目錄
/boot 存放系统启动时必须读取的档案,包括核心 (kernel) 在内
/boot/grub/menu.lst GRUB设置
/boot/vmlinuz & ......
转载自
http://blog.csdn.net/lyd518/archive/2008/08/19/2797134.aspx
1、
将文件checkout到本地目录
svn checkout
path(path是服务器上的目录)
例如:svn checkout svn:
//
192.168
.
1.1
/
pro
/
domain
简写:svn co
2、
往版本库中添加新的文件
svn
add
file
例如:svn
add
test.php ......
#include <fcntl.h>
int main(void)
{
typedef union un{
short s;
char c[sizeof(short)];
}un;
un myun;
myun.s = 0x0102;
......
./configure 检查系统信息
./configure --help | more 帮助信息
make clean   ......