info:script_time_display

temps d'exécution d'un script bash

script_time_display.sh

start=`date +%s`
echo "backup nas to usb disk"
 
echo "backup photos"
rsync -az /volume1/photo/PhotoLibrary/* /volumeUSB1/usbshare/photos
end=`date +%s`
runtime=$((end-start))
echo "time for running this script:"
echo $runtime
 
echo "backup ebooks"
rsync -az /var/services/homes/radeff/ebooks/* /volumeUSB1/usbshare/homes/radeff/ebooks
end=`date +%s`
runtime=$((end-start))
echo "time for running this script:"
echo $runtime
 
echo "backup music"
rsync -az /var/services/homes/radeff/music/* /volumeUSB1/usbshare/homes/radeff/music
end=`date +%s`
runtime=$((end-start))
echo "time for running this script:"
echo $runtime
 
echo "backup videos"
rsync -az /volume1/videos/* /volumeUSB1/usbshare/videos
end=`date +%s`
runtime=$((end-start))
echo "time for running this script:"
echo $runtime
 
echo "finished"
end=`date +%s`
runtime=$((end-start))
echo "Total time for running this script:"
echo $runtime
  • info/script_time_display.txt
  • Dernière modification : 2024/01/31 04:56
  • de radeff