linux运行bat脚本怎么写代码

linux运行bat脚本怎么写代码,第1张

以windows下备份sql数据库为例,开机自动执行.bat脚本 1、新建dump.bat文件,文件中的代码如下: set YYYYmmdd=%date:~0,4%%date:~5,2%%date:~8,2% set "filename=test%YYYYmmdd%.sql" echo %fil mb5fe55afb6fa16 1241 天前 原创 Windows开机自动执行bat脚本

编写脚本fio.sh,内容:

#/bin/sh

fio -filename=/dev/sdl -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=8k -size=200G -numjobs=30 -runtime=60 -group_reporting -name=mytest

sleep 60

fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=32k -size=200G -numjobs=30 -runtime=60 -group_reporting -name=mytest

sleep 60

fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=32k -size=200G -numjobs=1 -runtime=60 -group_reporting -name=mytest

sleep 60

fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=32k -size=200G -numjobs=1 -runtime=60 -group_reporting -name=mytest

执行脚本:

bash ./fio.sh >fio.log 2>&1


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/8521032.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-17
下一篇2023-04-17

发表评论

登录后才能评论

评论列表(0条)

    保存