Created
September 19, 2018 05:29
-
-
Save locona/132a2ca885e13ac027a1f042622910fd to your computer and use it in GitHub Desktop.
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
hcommand to find recursively files {can be modified for folders too, change -type f}, and renamed them by specfying regex pattern | |
find . -type f -maxdepth [depth] -name "[filepattern]" | while read FNAME; do mv "$FNAME" "${FNAME//search/replace}"; done | |
example: | |
find . -type f -maxdepth 1 -name "domain*.php" | while read FNAME; do mv "$FNAME" "${FNAME//domain/lead}"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
find . -type f -maxdepth 10 -name "*txt" | while read FNAME (gke_cdp-dev-206602_asia-northeast1-a_cdp-dev-k8s/cdp)${FNAME} $ (dirname ${FNAME})/
do
mv
node -e 'console.log(Date.now())'
.jsondone