Skip to content

Instantly share code, notes, and snippets.

@M-Porter
Created September 22, 2015 07:39
Show Gist options
  • Save M-Porter/22e8ae419876968569e9 to your computer and use it in GitHub Desktop.
Save M-Porter/22e8ae419876968569e9 to your computer and use it in GitHub Desktop.
remove_dsstore.rb
#!/usr/bin/env ruby
std_out = `find . -name *.DS_Store`
files = std_out.split("\n")
files.each do |file|
File.delete(file)
end
@M-Porter
Copy link
Author

Useful script if you are not good with the command line and need to delete all the .DS_Store files recursively within a directory and its subdirectories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment