使用rm * -f删除缓存目录文件时,报如下错误-bash: /bin/rm: Argument list too long提示文件数目太多。解决的办法是使用如下命令:ls | xargs -n 10 rm -fr ls输出所有的文件名(用空格分割) xargs就是将ls的输出,每10个为一组(以空...
分类:
其他好文 时间:
2015-10-13 15:12:55
阅读次数:
128
#!/bin/bash#author:wangqdPROC_NAME_1="GameServerClusterR"PROC_NAME_2="grserver"LOG_FILE=/var/log/GM.logCHECK_TIME=$(date+"%Y-%m-%d%H:%M:%S%Y")PROC_OUT=‘/opt/scripts/cron/.centos-rsync-lock‘#checkif[-f$PROC_OUT];thenecho"进程为正常关闭" exit0fi#GameServerCl..
分类:
其他好文 时间:
2015-10-13 13:58:44
阅读次数:
188
1>vi/usr/local/webserver/nginx/logs/cut_nginx_log.sh#!/bin/bash
#function:cutnginxlogfilesforlnmp
#author:http://lnmp.org
#setthepathtonginxlogfiles
log_files_path="/usr/local/webserver/nginx/logs/"
log_files_dir="/usr/local/webserver/nginx/logs/old/"
#..
分类:
其他好文 时间:
2015-10-13 12:26:12
阅读次数:
197
编辑/etc/profile文件或者/etc/bashrc文件,添加如下内容export HISTFILE=$HOME/.bash_historyexport HISTSIZE=2000export HISTFILESIZE=2000export HISTTIMEFORMAT="%F %T `who...
分类:
其他好文 时间:
2015-10-13 10:38:08
阅读次数:
123
Shell基础-环境变量配置文件source 配置文件 或者 . 配置文件:把环境变量写入配置文件后,需要用户重新登陆才能生效,而是用source命令,则能直接生效主要的配置文件: /etc/profile /etc/profile.d/*.sh ~/.bash_profile ~/.bashrc ...
分类:
系统相关 时间:
2015-10-12 23:55:45
阅读次数:
191
Mac 下使用终端遇到了这个问题:appledeMacBook-Air:~ air$ vi .bash_profile-bash: vi: command not found如图所示:解决方法寻找中……这篇文章Linux命令行报bash:.....:command not found的解决办法介绍的...
分类:
系统相关 时间:
2015-10-12 12:20:39
阅读次数:
214
打开终端:touch .bash_profileopen -e .bash_profile这样会弹出一个 “.bash_profile” 文本文件,可以直接编辑和保存,很方便。更新配置:命令:source .bash_profile 验证 adb是否成功配置:终端输入:adb或者adb versio...
分类:
移动开发 时间:
2015-10-12 12:16:32
阅读次数:
128
进入命令行:cd ~touch .bash_profilevi .bash_profile输入内容jdk变量配置内容:export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home #jdk安装路径 ....
分类:
系统相关 时间:
2015-10-12 12:08:02
阅读次数:
459
1;2c after using cat or more on binary filesI noticed that if you use the hex 05 in a file and cat or more the file you can get bash to say 1;2c.oxaga...
分类:
其他好文 时间:
2015-10-12 10:39:34
阅读次数:
229
#!/bin/bash#硬盘是否损坏(echo),i节点,硬盘空间使用率。#Iftheharddriveisdamaged(ECHO),theI-node,diskspaceusage.CD=`df-l|awk‘NR==3{print$4}‘|awk‘BEGIN{FIELDWIDTHS="21"}‘‘{print$1}‘`I=`df-i|awk‘NR==3{print$3}‘`DF=`df-l|awk‘NR==3{print$3}‘`DFG=`expr$DF/10485..
分类:
其他好文 时间:
2015-10-12 02:04:24
阅读次数:
184