Terminal Startup Commands
Mac OS X (10.6.3)
Mac OS X (10.6.3)
Is there a way to figure out which file is the offending file. The computer I am using is a shared computer with many users.
When Terminal opens in a different user it responds normally so the offending file is within my user. If you could give me a list of files that might be the bad one that would be great.
#!/bin/sh
#showallfiles
# Description and usage message
usage () {
echo "
Description:
A simple shell script to reveal/conceal files
hidden in Mac OS X Finder application.
showallfiles excepts one option.
Usage: ${0##*/} [-h|--help] to show this help
${0##*/} [on|ON] to show hidden files
${0##*/} [off|OFF] to set the default hidden files
Example: ${0##*/} on
"
}
# Test for more than one option
if [ $# -gt 1 ]
then echo "${0##*/} -h to access help"; exit
fi
# Get the AppleShowAllFiles status in the domain com.apple.finder.plist or create the default off setting
STATUS=`defaults read com.apple.finder AppleShowAllFiles 2>/dev/null` || STATUS=`defaults write com.apple.finder AppleShowAllFiles OFF`
# Function to check AppleShowAllFiles status and change the status if necessary
finderfilesstatus () {
if [ "$STATUS" = "$SAF_OPT" ]
then
echo "AppleShowAllFiles is set to $SAF_OPT"
else
defaults write com.apple.finder AppleShowAllFiles $SAF_OPT
osascript -e 'tell application "Finder" to quit' -e 'delay 1' -e 'tell application "Finder" to launch'
fi
}
# Parse the command option
case "$1" in
'-h'|'--help') usage; exit;;
'on'|'ON') SAF_OPT="ON"; finderfilesstatus;;
'off'|'OFF') SAF_OPT="OFF"; finderfilesstatus;;
*) echo "${0##*/} -h to access help"; exit;;
esac
Terminal Startup Commands