Most Mac tool applications actually have some scripts behind it. Quickly, I found out that there is a setting to make Finder to display system files: AppleShowAllFiles in com.apple.Finder default settings. This can be verified in a Terminal:
[MyMac]~ [user]$ defaults read com.apple.Finder | grep Apple
AppleShowAllFiles = 0;
AppleShowAllFiles = 0;
The default setting value is 0, which means disabling Show hidden and system files. To set this enabled, type the following command:
[MyMac]~ [user]$ defaults write com.apple.Finder AppleShowAllFiles 1
To verify its value, you may use alternative way to read value:
[MyMac]~ [user]$ defaults read com.apple.Finder AppleShowAllFiles
1
1
The Finder would not immediately be able to show hidden files. It has to be relaunched. One way to launch it is to Force Quit from Apple menu:
The short-cut key for this Command+Option+esc, then select Finder to relaunch it. The above snap-shot actually shows the wrong keys when I tried to take a snap of this menu by using Command+shift+4 key. The Force Quit... becomes Force Quit Finder with extra key shift. Manu shortcut keys are very handy. This Apple support web page lists Mac shortcut keys.
To relaunch Finder in command scripts, you can use ps and grep to find the current Finder process id,
[MyMac]~ [user]$ ps -ax | grep Finder
2357 ?? 0:00.21 /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
2357 ?? 0:00.21 /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
and then use Kill and Open to relaunch it (your Finder process id may be different):
[MyMac]~ [user]$ kill 2357 && open /System/Library/CoreServices/Finder.app
Notice, the application Finder is within the Finder.app package, and you just need to use package to launch it.
No comments:
Post a Comment