linux
Garon_InE
这个作者很懒,什么都没留下…
展开
-
linux rar和zip工具
rar与unrar用法详解压缩命令rar的使用: 用法: rar <命令> -<选项 1> -<选项 N> <压缩档案> <文件…> <@文件列表…> <解压缩路径><命令>a 添加文件到压缩档案c 添加压缩档案注释(注释的大小最大不能超过62000字节)cf 添加文件备注(原创 2016-12-12 15:59:43 · 2217 阅读 · 0 评论 -
Install Java on Ubuntu with Apt-Get
//python-software-properties 提供add-apt-repositorysudo apt-get install python-software-propertiessudo add-apt-repository ppa:webupd8team/java//更新源sudo apt-get update//java7sudo apt-get install orac原创 2017-03-14 00:26:10 · 427 阅读 · 0 评论 -
批量Kill多个进程的方法
ps -ef|grep /usr/local/apache-tomcat-document/|grep -v grep|cut -c 9-15|xargs kill -9 管道符“|”用来隔开两个命令,管道符左边命令的输出会作为管道符右边命令的输入。 下面说说用管道符联接起来的 几个命令: “ps - ef”是Red Hat 里查看所有进程的命令。这时检索出的进程将作为下一条命令“grep原创 2017-03-14 00:11:48 · 2885 阅读 · 0 评论 -
ubuntu 安装MySQL-python(MySQLdb)
1.安装pip并升级到最新版本apt-get install python-pippip install -U pip2.安装所需的开发包apt-get install python-dev libmysqlclient-dev3.最后pip install MySQL-python原创 2017-02-08 01:49:10 · 420 阅读 · 0 评论 -
shell 定时备份mysql
使用时,传数据库名称 sh dbbak.sh mysqlnamedbbak.sh文件如下#!/bin/shlocation="/home/mysqlbak/"if [ ! -x "$location" ]; then mkdir "$location"filocation=$location$1"/"if [ ! -x "$location" ]; then mkdir原创 2017-01-18 22:56:28 · 240 阅读 · 0 评论 -
shell 解决syntax error问题的一种方法
如果使用Windows编辑的 shell脚本中行尾有可能存在“^M”符号因为MS-DOS及Windows是回车+换行来表示换行,因此在Linux下用Vim查看在Windows下用VC写的代码,行尾后的“^M”符号,表示的是符。在Vim中解决这个问题,很简单,在Vim中利用替换功能就可以将“^M”都干掉,键入如下替换命令行: 1)vi -b setup.sh 2)在命令编辑行<就是: 按E原创 2017-02-17 02:52:51 · 12471 阅读 · 0 评论 -
shell判断传入参数是否存在
#!/bin/shif [ x"$1" = x ]; then echo "no cmd param!" exit 1fi... ...原创 2017-02-17 02:46:37 · 15565 阅读 · 0 评论 -
shell 定时删除某个目录指定格式文件(递归)
#!/bin/shlocation="./cache/"while(true)do find $location -mmin +59 -regex .*\.html | xargs rm -f sleep 30sdone原创 2017-01-10 21:47:47 · 1470 阅读 · 0 评论 -
apache .htaccess
#test functionRewriteCond %{HTTP_COOKIE} ^.*somekey.*RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^ index.php [L]#check is dir url not exsit index.htmlRewriteR原创 2017-01-10 21:45:48 · 280 阅读 · 0 评论 -
多线程下载|Axel命令
Debian/Ubuntu安装Axel: apt-get install axelAxel命令使用方法: axel 参数 文件下载地址可选参数: -n 指定线程数 -o 指定另存为目录 -s 指定每秒的最大比特数 -q 静默模式如果下载过程中下载中断可以再执行下载命令即可恢复上次的下载进度。原创 2017-01-14 00:08:02 · 548 阅读 · 0 评论 -
tomcat-多域名
在tomcat/conf/server.xml文件中:<Host autoDeploy="true" name="localhost【多个ip就填ip,多个域名就填域名/简名】" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"> <Context docBase="【webapps/myapps/Child|原创 2017-01-09 03:14:24 · 312 阅读 · 0 评论 -
centOS7 添加IP的方法
复制一份IP配置文件:# cd /etc/sysconfig/network-scripts# cp ifcfg-eth0 ifcfg-eth0:0# nano ifcfg-eth0:0使用cp命令复制一个eth0的文件,新的文件名为eth0:0 ,然后用nano编辑此文件。不习惯用nano的可以用vi等命令。打开文件后编辑:DEVICE=eth0:0 #此处添加:0,保持和文件名一致原创 2017-01-09 03:11:54 · 6817 阅读 · 0 评论 -
ubuntu关于docker一些事
安装这里使用的是阿里云Docker-Engine: [(http://mirrors.aliyun.com/help/docker-engine)]curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -使用命令1. docker version显示 Docker 版本原创 2017-03-15 02:37:27 · 441 阅读 · 1 评论