Created
September 10, 2016 11:41
-
-
Save joshuacerbito/3e953b71e41e0cbdbf3e0d6be34b2d82 to your computer and use it in GitHub Desktop.
Unhide all files from a directory; A fix for the common Windows virus. (Change the Volume and Directory name)
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
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
# set me | |
FILES=/Volumes/DATA/Drive/*/ | |
for f in $FILES | |
do | |
chflags nohidden "$f" | |
done | |
# restore $IFS | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment