unix shell命令
2016-06-15 16:53
375 查看
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
chsh -s /bin/zsh
编辑 ~/.zshrc
ZSH_THEME = "robbyrussell"
man commandxx 查看某个命令的使用说明
权限----------------------
chmod o+wx testfile 给某个目录权限
chmod 777 README.md 也可用code代替一个权限结合 7最高权限 a-b-c
chown user filelist ( "change owner")
chgrp group filelist ("change group")
passwd 改密码
cal 显示日历
PS1="[\\u@\\h]:\$PWD>\$" 修改前面提示符
ps 显示进程
kill UID 终止某个进程
ftp hostname or ip
ping
文件相关-----------------------------------------
cat 显示文件内容 vi 编辑 wc 显示 总行,总单词,总字母
cp souceA destB复制文件 rm 删除
目录-----
cd ~, cd ~username mkdir创建目录 mv移动文件夹(也可用于重命名)
过滤---------
ls -l | grep -i "carol.*aug"
sort 排序
几个高级命令 ed, sed, awk, grep
shell 编程
不写分号
`expr $a + $b` 表达式应该这样
arr1[0] = 23
if [$a == $b] *****
逻辑运算 ! -o -a,关系运算还可以 -eq -gt -ge -le ...
字符串关系运算(单独) = ,!=,-z,-n
文件状态boolean [ -b $file ] , -b,-c,-f.....
条件语句
if...fi statement
if...else...fi statement
if...elif...else...fi statement
case http://www.tutorialspoint.com/unix/case-esac-statement.htm
循环语句http://www.tutorialspoint.com/unix/unix-shell-loops.htm
Hello Zara Ali
ret=$? #Capture value returnd by last command
unset .f function_name 删除某个函数
参考资料
http://www.tutorialspoint.com/unix/unix-processes.htm
git资料
http://git.oschina.net/progit/index.html
chsh -s /bin/zsh
编辑 ~/.zshrc
ZSH_THEME = "robbyrussell"
man commandxx 查看某个命令的使用说明
权限----------------------
chmod o+wx testfile 给某个目录权限
chmod 777 README.md 也可用code代替一个权限结合 7最高权限 a-b-c
chown user filelist ( "change owner")
chgrp group filelist ("change group")
passwd 改密码
cal 显示日历
PS1="[\\u@\\h]:\$PWD>\$" 修改前面提示符
ps 显示进程
kill UID 终止某个进程
ftp hostname or ip
ping
文件相关-----------------------------------------
cat 显示文件内容 vi 编辑 wc 显示 总行,总单词,总字母
cp souceA destB复制文件 rm 删除
目录-----
cd ~, cd ~username mkdir创建目录 mv移动文件夹(也可用于重命名)
过滤---------
ls -l | grep -i "carol.*aug"
sort 排序
几个高级命令 ed, sed, awk, grep
shell 编程
不写分号
`expr $a + $b` 表达式应该这样
arr1[0] = 23
if [$a == $b] *****
逻辑运算 ! -o -a,关系运算还可以 -eq -gt -ge -le ...
字符串关系运算(单独) = ,!=,-z,-n
文件状态boolean [ -b $file ] , -b,-c,-f.....
条件语句
if...fi statement
if...else...fi statement
if...elif...else...fi statement
case http://www.tutorialspoint.com/unix/case-esac-statement.htm
循环语句http://www.tutorialspoint.com/unix/unix-shell-loops.htm
Hello Zara Ali
ret=$? #Capture value returnd by last command
unset .f function_name 删除某个函数
参考资料
http://www.tutorialspoint.com/unix/unix-processes.htm
git资料
http://git.oschina.net/progit/index.html
相关文章推荐
- -bash: pod: command not found 解决办法
- linux shell 指令 诸如-d, -f, -e之类的判断表达式
- Bash Shell 中数字运算
- 利用JMeter的beanshell进行接口的加密处理
- HDFS基本Shell命令
- RHEL6.5 更改Shell版本
- shell写多行到文件中
- Linux中shell文件操作大全
- 【shell】read
- leetcode-shell-195. Tenth Line
- Shell多线程脚本
- shell脚本采用crontab定时备份数据库日志
- 【shell】变量
- Xshell秘钥登录Linux服务器: root && 普通用户
- PowerShell Script Analyzer, Script browser 和 Pester
- PowerShell Script Analyzer, Script browser 和 Pester
- shell编程——if语句 if -z -n -f -eq -ne -lt
- 记录一下自己bashrc
- PowerShell 指定关键词遍历文件内容
- 0531 linux系统command shell(2)