Skip to content

Instantly share code, notes, and snippets.

@jcanfield
Created April 1, 2015 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcanfield/bf91afc2098609c83c46 to your computer and use it in GitHub Desktop.
Save jcanfield/bf91afc2098609c83c46 to your computer and use it in GitHub Desktop.
Linux command line script to remove recursively (Link with `sudo ln -sv $HOME/.bin/rmr.sh /usr/local/sbin`)
#!/bin/bash
# USAGE: rmr *.ra*
# SYNOPSIS: Use this script to remove file types recursively. You can link it via `sudo ln -sv $HOME/.bin/rmr.sh /usr/local/sbin`
echo "--> Removing $1 recursively from $PWD"
find . -name "$1" -print0 | xargs -0 rm -rvf
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment