Skip to content

Instantly share code, notes, and snippets.

@joshuacerbito
Created September 10, 2016 11:41
Show Gist options
  • Save joshuacerbito/3e953b71e41e0cbdbf3e0d6be34b2d82 to your computer and use it in GitHub Desktop.
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)
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