Saturday, 24 August 2013

com.apple.finder AppleShowAllFiles updates automatically [duplicate]

com.apple.finder AppleShowAllFiles updates automatically [duplicate]

This question already has an answer here:
AppleShowAllFiles does not show hidden files 5 answers
I have been trying to write a shell script which could toggle visibility
of hidden files
CURRENT_STATUS=`defaults read com.apple.Finder AppleShowAllFiles`
NEW_STATUS="YES"
if [ "$CURRENT_STATUS" = "YES" ]; then
NEW_STATUS="NO"
fi
defaults write com.apple.Finder AppleShowAllFiles $NEW_STATUS
sudo killall Finder
Something really weird happens when I run this script. After I have
updated the Status using the write command sometimes (not always) the
value reverts back. So say for example if I set the value as YES after
sometime on restarting the Finder app the value will turn back to NO. Can
someone help in figuring out why this happens?
Update: I found the solution here: AppleShowAllFiles does not show hidden
files

No comments:

Post a Comment