#!/bin/bash dest="/media/media3/" part="/dev/mapper/homevg-media3" cmd1="cp -r /media/media4/video/best $dest" cmd2="rsync -rlhtgopu /media/media4/backup $dest" cmd3="grep linux -sir $dest/backup/wine-src/" cmd4="find $dest -type f -delete" ctime='/usr/bin/time --output=test_pipe --format=%e' bsize=1024 function mk_fs { umount $dest if [[ "$1" == "reiserfs" || "$1" == "xfs" || "$1" == "jfs" ]]; then mkfs.$1 -f $part else mkfs.$1 $part fi mount -t $1 $part $dest } echo "тестирование файловых систем, ждите и наблюдайте" > test_pipe for fs in $@; do echo "---------------------------" > test_pipe echo "тестирвание: $fs" > test_pipe mk_fs $fs > /dev/null echo -n "копирование больших файлов: " > test_pipe $ctime $cmd1 2> /dev/null echo -n "бекап домашней директории: " > test_pipe $ctime $cmd2 2> /dev/null echo -n "поиск среди маленьких файлов: " > test_pipe $ctime $cmd3 2> /dev/null > /dev/null echo -n "повторный поиск среди маленьких файлов: " > test_pipe $ctime $cmd3 2> /dev/null > /dev/null echo -n "поиск и удаление файлов: " > test_pipe $ctime $cmd4 2> /dev/null echo -n "средняя нагрузка на систему: " > test_pipe uptime |awk '{print $8,$9,$10}' > test_pipe echo "10 минут отдохнём" > test_pipe sleep 600 done