Created
February 20, 2018 18:23
-
-
Save sony-mathew/364c2a093ae88c28dd31feb2e8e68fcb to your computer and use it in GitHub Desktop.
Script to show hidden files in mac
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
#!/bin/bash | |
# There are many folders and files which are by default hidden in mac like the .ssh folder, .bash_profile .. etc. | |
# In order for that to show up in your finder you can use this script. | |
# | |
# Download this script and give it the execute permission : $ chmod 764 show-hide-mac.sh | |
# Now click on the script. It will popup a terminal window with 3 options. | |
# 's' for show | |
# 'h' for hide | |
# 'e' for exit | |
# | |
# Once you select show or hide and exit and go to finder to see the hidden files. | |
# Author : Sony Mathew | |
# Date : 12 March 2017 | |
echo "Show (s) or Hide (h) or Exit (e) Hidden Files in Finder?" | |
select yn in "s" "h" "e"; do | |
case $yn in | |
s ) defaults write com.apple.finder AppleShowAllFiles YES; echo "Shown";; | |
h ) defaults write com.apple.finder AppleShowAllFiles NO; echo "Hidden";; | |
e ) exit ;; | |
esac | |
killall Finder; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment