Created
June 4, 2017 11:29
-
-
Save HR/c88a23ffb9232bb4147b4a6c0c1b53a8 to your computer and use it in GitHub Desktop.
Useful bash utility functions
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
# FileSearch | |
function f() { find . -iname "*$1*" ${@:2} } | |
# File removal by name | |
function frm() { find . -iname "*$1*" -print0 | xargs -0 rm -r } | |
# File content search | |
function fr() { grep "$1" ${@:2} -R . } | |
# mkdir and cd | |
function mkcd() { mkdir -p "$@" && cd "$_"; } | |
# add commit and push all change instantly | |
function gacop() { | |
git add -A | |
git commit -am $1 | |
git push | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment