先讲解后试验,最后有截图文件一、用户账户管理1.用户账户: 超级用户root(0) 程序用户(1~499) 普通用户(500~60000)组账户: 基本组(私有组) 附加组(公共组)2./etc/passwd 保存用户账户的基本信息#grep^root/etc/passwdroot:x:0:0:root:/root:/bin/bash 字段1:帐号..
分类:
其他好文 时间:
2014-07-31 03:12:06
阅读次数:
415
shell的种类: sh ?- Bourne shell csh or tcsh - C shell korn - Korn shell bash - GNU Bourne-Again shell 1.最简单的列子 例子 #!/bin/bash ? #?This?is?a?very?simple?example?echo?Hello?World e...
分类:
其他好文 时间:
2014-07-31 00:13:45
阅读次数:
454
《鸟哥的linux私房菜》基础学习篇P382中说,在bash中"="与"=="是相同的,都代表判断是否相等,只不过由于其他语言一般写法使用"==",因此建议使用后者。但是实验时,二者还是有所不同。环境为ubuntu,3.5.0-43-generic #66~precise1-Ubuntu SMP Thu Oct 24 14:55:08 UTC 2013 i686 i686 i386 GNU/Lin...
分类:
系统相关 时间:
2014-07-30 23:54:55
阅读次数:
427
vi?lvm_extend.sh
#!/bin/bash
#jk409???2014-7-30
#eg.
#lvm_extend.sh???/dev/sdb?????9.9
#扩展10g
yp=$1
Size=$2
fdisk?${yp}?<<?EOF
n
p
1
t
8e
wq
EOF
partprobe
mkfs.ext4??${yp}1
pv...
分类:
其他好文 时间:
2014-07-30 21:00:15
阅读次数:
245
$wget http://mirrors.cnnic.cn/apache/thrift/0.9.1/thrift-0.9.1.tar.gz$tar zxvf thrift-0.9.1.tar.gz$cd thrift-0.9.1$./configure$make /bin/bash ../../l....
分类:
其他好文 时间:
2014-07-30 20:32:14
阅读次数:
624
一:单行注释直接在行首加"#"如:#我是注释行二、多行注释利用:空命令注意:以下方法中如果在注释中出现反引号引用的命令将会执行,存在风险。1.把输入重定义到前面的命令,但是":"是空命令,所以就相当于注释了。:<<BLOCK
....我是注释内容
....我是注释内容
....我是命..
分类:
其他好文 时间:
2014-07-30 17:50:34
阅读次数:
242
#!/bin/bash#文件名:checkword.shword=$1grep "^$1$" /usr/share/dict/linux.words -qif [ $? -eq 0 ];then echo $word is a dictionary word;else e...
分类:
其他好文 时间:
2014-07-30 17:10:13
阅读次数:
180
1、将来aapt和apktool拷贝到/usr/bin/下面 2、运行aapt报错: -bash: /usr/bin/aapt: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory 解决:反查需要的文件在哪个包中 yum whatprovides *...
分类:
系统相关 时间:
2014-07-30 15:07:05
阅读次数:
583
首先介绍bash的特殊语法${parameter#*word}其中parameter为变量,word为分隔符,表示从变量最边左字符开始到第一匹配到分隔符(word)之间的字符串都去掉${parameter##*word}:表示从变量最左边字符开始到最后一次匹配到该分隔符之间的字符串都去掉注意:其中变量不要加$符号当*..
分类:
系统相关 时间:
2014-07-30 03:25:33
阅读次数:
306
1.找到android sdk的本地路径,adb命令在platform-tool下面,记为XXXX我的路径是(/Applications/eclipse/android-sdk-mac_x86/platform-tools)2.打开终端输入touch .bash_profile open -e .b...
分类:
移动开发 时间:
2014-07-29 16:49:52
阅读次数:
181