Last active
February 8, 2016 09:27
-
-
Save marcocaboni/2645091 to your computer and use it in GitHub Desktop.
Bash tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # File name from fullpath | |
| find . -name *.sql | sed 's/^.*\///' | |
| # or also | |
| find . -name *.sql -exec basename {} \; | |
| # delete folders containing big old files | |
| find . -size +50M -mtime +150 -exec dirname {} \; | grep -v cache | xargs rm -rf | |
| # execute a command in each sub-directory | |
| for D in `find . -mindepth 1 -maxdepth 1 -type d`; do (cd $D && svn ci -m "commit post release" && cd -); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment