Skip to content

Instantly share code, notes, and snippets.

@justyns
Created January 20, 2013 10:12
Show Gist options
  • Save justyns/4577670 to your computer and use it in GitHub Desktop.
Save justyns/4577670 to your computer and use it in GitHub Desktop.
Use this when you are trying to delete 100s of thousands of files in a single directory, and can not do so using rm.
perl -e 'chdir "problem_dir" or die; opendir D, "."; while ($n = readdir D) { unlink $n }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment