SHELL脚本
SHELL的实战学习
菜鸟来了2022
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
shell 抓包脚本
#!/bin/bash. /etc/profile #解决which tcpdump ifconfig找不到的问题savapath=XXXXX #保存路径dayout=XXX #保存多少天的值maxfilesize= XXX #文件的大小netnames=$* #传入网口的名称,如果不传入,则默认监视所以网卡,传入模式eth0 eth1G_captool=`which tcpdump`G_ifconfig=`which ifconfig`if [ ! -d $sava...原创 2022-05-06 17:46:32 · 1046 阅读 · 0 评论 -
shell 编写sftp上传文件
#!/bin/bashfilenametime=`date '+%Y%m%d%H%M%S'`contenttime=`date '+%Y-%m-%d %H:%M:%S'`filehead=fileend=filemid=#====================================================================================#本地上传文件存放路径srcpath=/home/sd_infofarmcode=#需要配置对端cft原创 2022-04-20 17:39:41 · 1069 阅读 · 0 评论 -
针对linux的core文件生成设置。
#设置core文件无限大mkdir /var/coreecho "ulimit -c unlimited" >> /etc/profilesource /etc/profile#设置core文件带进程号echo "kernel.core_pattern = /var/core/core_%e_%p" >> /etc/sysctl.confecho "kernel.core_uses_pid = 0" >> /etc/sysctl.confsysctl -p原创 2022-04-20 14:09:34 · 173 阅读 · 0 评论 -
卸载mysql 脚本。
#!/bin/bash if [[ $(chkconfig --list | grep "mysqld" | wc -l) -gt 0 ]];then service mysqld stop > /dev/null chkconfig --del mysqld fi rpm -qa | grep -i "mysql" > tmp for var in $(cat $PWD/tmp) do rpm -e --nodeps $var &...原创 2022-04-20 11:43:35 · 468 阅读 · 0 评论 -
SHELL 基于centos6.7、centos7.4和中标麒麟系统安装数据库mysql8.0.11版本
#!/bin/sh#基于centos6.7、centos7.4和中标麒麟系统安装数据库mysql8.0.11版本。echo "---------开始检查mysql安装情况---------"#定义my.cnf配置文件function mysqlcnf(){ cat >> /etc/my.cnf <<EOF[mysqld]datadir=/mysql/mydata/datasocket=/tmp/mysql.sockuser=mysql# Disabling...原创 2022-04-08 16:13:36 · 1572 阅读 · 0 评论
分享