Skip to content

Instantly share code, notes, and snippets.

@dstarh
Last active August 29, 2015 14:07
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 dstarh/5dd791c24ddb0cdb54a8 to your computer and use it in GitHub Desktop.
Save dstarh/5dd791c24ddb0cdb54a8 to your computer and use it in GitHub Desktop.
/usr/bin/find /pgbackups/backups/ -mtime +4 -type d -name "nbackup_*" -exec /bin/rm {}/* \; -exec rmdir {} \;
/bin/rm: cannot remove `/pgbackups/backups/nbackup_foo2/*': No such file or directory
/bin/rm: cannot remove `/pgbackups/backups/nbackup_foo3/*': No such file or directory
/bin/rm: cannot remove `/pgbackups/backups/nbackup_foo1/*': No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment