Advertisement
Deltik

superuser.se :: 1462081 :: benchmark script

Jul 22nd, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.50 KB | None | 0 0
  1. #!/bin/bash
  2. set -x
  3.  
  4. CWD=$(pwd)
  5.  
  6. rm -fv $CWD/Deltik.out
  7. rm -fv $CWD/sitaram.out
  8. rm -fv $CWD/PeterCordes.out
  9. rm -fv $CWD/Fanatique.out
  10. rm -fv $CWD/harrymc.2.out
  11. rm -fv $CWD/harrymc.1.out
  12.  
  13. find $CWD/toor/ | xargs -P4 rm -rf
  14. mkdir -pv $CWD/toor/
  15. cd $CWD/toor/
  16.  
  17. echo {0..999} | xargs mkdir -p
  18. find -type d -exec bash -c "cd {}; echo {0..999} | xargs touch" \;
  19. find | wc -l
  20. find -type d | wc -l
  21. find -type f | wc -l
  22.  
  23. for i in {0..9} ; do chmod -R 0777 "$(pwd)" ; { time { find "$(pwd)" -type d | xargs -P4 chmod 755 & find "$(pwd)" -type f | xargs -P4 chmod 644 & wait ; } ; } 2>&1 | tee -a $CWD/Deltik.out ; done
  24. for i in {0..9} ; do chmod -R 0777 "$(pwd)" ; { time chmod -R a=,u+rwX,go+rX "$(pwd)" ; } 2>&1 | tee -a $CWD/sitaram.out ; done
  25. for i in {0..9} ; do chmod -R 0777 "$(pwd)" ; { time find "$(pwd)" \( -type d -exec chmod 755 {} + \) -o \( -type f -exec chmod 644 {} + \) ; } 2>&1 | tee -a $CWD/PeterCordes.out ; done
  26. for i in {0..9} ; do chmod -R 0777 "$(pwd)" ; { time { find "$(pwd)" -type d -print0 | xargs -0 chmod 755 ; find "$(pwd)" -type f -print0 | xargs -0 chmod 644 ; } ; } 2>&1 | tee -a $CWD/Fanatique.out ; done
  27. for i in {0..9} ; do chmod -R 0777 "$(pwd)" ; { time { find "$(pwd)" -type d -exec chmod 755 {} + ; find "$(pwd)" -type f -exec chmod 644 {} + ; } ; } 2>&1 | tee -a $CWD/harrymc.2.out ; done
  28. for i in {0..0} ; do chmod -R 0777 "$(pwd)" ; { time { find "$(pwd)" -type d -exec chmod 755 {} \; ; find "$(pwd)" -type f -exec chmod 644 {} \; ; } ; } 2>&1 | tee -a $CWD/harrymc.1.out ; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement