Last active
March 26, 2019 04:03
-
-
Save yazdipour/55e17501a372f8d255a23eb3ac1c91ff 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
# 05_h.png >> 05_half.png | |
for file in *.png; do mv "$file" "${file/_h.png/_half.png}"; echo $f;done | |
# * >> *.mp4 | |
for file in *; do mv "$file" "$file.mp4";done | |
# */*/ -rec >> remove *.pdf && *.doc | |
IFS=$'\n'; set -f ## To skip problem of directories with spaces | |
for f in $(find . -name '*.pdf' -or -name '*.doc'); do rm "$f"; echo $f;done | |
unset IFS; set +f | |
# rm empty Dirs | |
IFS=$'\n'; set -f | |
for f in $(find . -type d -empty);do rm -r "$f" ;echo $f;done | |
unset IFS; set +f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment