![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux
wsliangjian
这个作者很懒,什么都没留下…
展开
-
常用 zip 压缩命令
[root@test test]# touch 1.txt 2.txt 3.txt[root@test test]# zip -r test.zip ./*[root@test test]# unzip -l test.zip // 查看压缩包内的文件(简略模式)[root@test test]# unzip -v test.zip // 查看压缩包内的文件(详细模式)[r原创 2013-11-07 15:37:17 · 740 阅读 · 0 评论 -
MySQL数据库自动备份脚本
#!/bin/bash#Shell Command For Backup MySQL Databases Eventday Automatically By CrontabUSER=rootPASSWORD=""DATABASE="admincp"HOSTNAME="192.168.1.190"BACKUP_DIR=/home/pirate/programs/nginx/html/原创 2014-01-08 15:10:56 · 772 阅读 · 0 评论 -
查找存在某字符的文件列表,不包含svn文件
find . ! -wholename '*.svn*' -print | xargs grep "img" | awk -F ':.' '{print $1}' | uniq原创 2014-07-10 17:58:30 · 863 阅读 · 0 评论 -
SHELL 分析日志
1、查看当天有多少个IP访问:awk '{print $1}' log_file|sort|uniq|wc -l2、查看某一个页面被访问的次数;grep "/index.php" log_file | wc -l3、查看每一个IP访问了多少个页面:awk '{++S[$1]} END {for (a in S) print a,S[a]}' log_file4、将每个IP访问的页面转载 2014-04-25 11:20:18 · 1075 阅读 · 0 评论 -
shell 字符串详细使用
#!/bin/bashstring="abcABC123EFGH"#字符串长度echo ${#string} # 输出13echo `expr length $string` # 输出13#索引#用法:expr index $string $substringecho `expr index $string "ABC"` # 输出4#提取子串#用法:${string:原创 2014-01-08 15:34:21 · 734 阅读 · 0 评论 -
Nginx工作原理和优化、漏洞
1. Nginx的模块与工作原理Nginx由内核和模块组成,其中,内核的设计非常微小和简洁,完成的工作也非常简单,仅仅通过查找配置文件将客户端请求映射到一个location block(location是Nginx配置中的一个指令,用于URL匹配),而在这个location中所配置的每个指令将会启动不同的模块去完成相应的工作。Nginx的模块从结构上分为核心模块、基础模块和第转载 2015-05-19 08:54:55 · 525 阅读 · 0 评论 -
高效Linux bash快捷键及alias总结
习惯使用编辑的快捷键可以大大提高效率,记忆学习过程要有意识的忽略功能键、方向键和数字小键盘。以下快捷键适用在bash处于默认的Emacs模式下。如果你有set -o vi,就处于 vi 模式就不适用了。另外下面的内容并不包含所有快捷键,只是我个人适用频率最高的几种,但相信已经可以大大提高工作效率了:Ctrl + l :清除屏幕,同clearCtrl + a :将光标定位到命令的开头转载 2015-05-19 17:12:49 · 539 阅读 · 0 评论 -
siege 使用
使用Siege格式,我们将模拟一个负载测试,5个并发用户在10秒内访问网站www.example. com。需要说明一下,使用Siege时的并发被称为事务。因此我们要模拟的测试是使用Siege命令让Web服务器在10秒的时间内一次满足5个同时发生的事务.结果说明: Lifting the server siege…原创 2015-07-30 11:45:37 · 1217 阅读 · 0 评论 -
给力的运维shell命令
1.显示消耗内存/CPU最多的10个进程ps aux | sort -nk +4 | tail -10ps aux | sort -nk +3 | tail -102.查看Apache的并发请求数及其TCP连接状态netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'另一种方法:netstat转载 2014-06-26 14:19:39 · 818 阅读 · 0 评论 -
Linux命令行技巧
命令描述•apropos whatis显示和word相关的命令。 参见线程安全•man -t man | ps2pdf - > man.pdf生成一个PDF格式的帮助文件 which command显示命令的完整路径名 time command计算命令运行的时转载 2014-07-25 16:57:43 · 471 阅读 · 0 评论 -
ImageMagick convert命令
下面,我对ImageMagick的主要功能做一个简单的介绍,其中覆盖的大都是人们常用的一些功能,如果你要全面的了解它的知识,你可以看看它的man手册。convertconvert顾名思义就是对图像进行转化,它主要用来对图像进行格式的转化,同时还可以做缩放、剪切、模糊、反转等操作。格式转化比如把 foo.jpg 转化为 foo.png: convert foo.jpg转载 2013-12-22 21:08:41 · 10050 阅读 · 0 评论 -
戴尔中小型企业 服务器排除问题的5分钟
1) 监控平台, 是否有日志查看2) 有谁在12wlast3)之前发生了什么1history4)现在在运行的进程是啥12pstree -a ps aux | grep xx转载 2014-02-19 18:23:42 · 814 阅读 · 0 评论 -
ubuntu 命令 tips 来自于 ubuntu中文论坛
tips = new Array(222);code = new Array(222);tips[0] = '查看软件xxx安装内容';code[0] = 'dpkg -L xxx';tips[1] = '查找软件库中的软件';code[1] = 'apt-cache search 正则表达式';tips[2] = '查找软件库中的软件';code[2] = 'aptitude se转载 2013-11-07 17:34:44 · 878 阅读 · 0 评论 -
每个极客都应该知道的Linux技巧
http://os.51cto.com/art/201403/431387.htm原创 2014-03-12 18:04:08 · 427 阅读 · 0 评论 -
Linux 下的几个命令(iostat、iotop、strace、inotifywait)
iotop命令是专门显示硬盘IO的命令,界面风格类似top命令。这个命令只有在kernelv2.6.20及以后的版本中才有。1、直接yum安装,rh6的光盘里有包yum install iotop2、命令参数介绍-o, --only Only show processes or threads actually doing I/O, instead of s原创 2014-03-25 19:20:27 · 1343 阅读 · 0 评论 -
vim配置
set backupdir=/tmp directory=/tmpset modeline si ai incsearch sw=4 ts=4 history=64 encoding=UTF-8set formatoptions-=t textwidth=76 "only wrap when in commentset hlsearchset modeline"encodingset原创 2014-07-08 10:01:52 · 463 阅读 · 0 评论 -
高性能HTTP加速器Varnish安装与配置(包括常见错误)
Varnish是一款高性能的开源HTTP加速器,挪威最大的在线报纸Verdens Gang使用3台Varnish代替了原来的12台Squid,性能居然比以前更好。Varnish 的作者Poul-Henning Kamp是FreeBSD的内核开发者之一,他认为现在的计算机比起1975年已经复杂许多。在1975年时,储存媒介只有两种:内存与硬盘。但现在计算机系统的内存除了主存外,还包括了cpu内的L1原创 2014-08-08 14:47:04 · 2765 阅读 · 0 评论 -
htop使用
wget http://sourceforge.net/projects/htop/files/htop/1.0.2/htop-1.0.2.tar.gztar -zxf htop-1.0.2.tar.gz./configuremake & make install原创 2014-09-03 19:20:42 · 569 阅读 · 0 评论 -
nginx+lua_nginx+GraphicsMagick生成实时缩略图
一、安装 lua 首先确认是否安装 readline yum -y install readline-devel ncurses-devel 进入页面:http://www.lua.org/download.htmlwget http://www.lua.org/ftp/lua-5.3.1.tar.gz tar zxvf lua-5.3.1.tar.转载 2016-09-13 21:27:10 · 2472 阅读 · 0 评论