Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > show dotfiles in finder?

show dotfiles in finder?
Thread Tools
zeller
Junior Member
Join Date: Dec 1999
Status: Offline
Reply With Quote
Oct 4, 2000, 07:27 PM
 
Hey fellow OS-Xers,

Does anyone know how to tell the new Finder to show dotfiles? i.e. the files that begin with the period character and are normally hidden under un*x unless one uses the -a arguement in ls...

anyone, anyone?

tia,

Ben
     
zerologic
Dedicated MacNNer
Join Date: Sep 2000
Location: Dallas, Texas
Status: Offline
Reply With Quote
Oct 4, 2000, 10:42 PM
 
From a friend of mine:

If you want to see all the hidden files and directories, open up a terminal
window and type

defaults write com.apple.finder ShowAllFiles TRUE

then restart the desktop

[FONT="Trebuchet MS"]Fully dynamic web site Starting Points.[/FONT]
     
zeller  (op)
Junior Member
Join Date: Dec 1999
Status: Offline
Reply With Quote
Oct 5, 2000, 01:05 AM
 
Zerologic, thanks for your help. I wrote a little shell script to automate the process. Here's the script:

Code:
#!/bin/sh defaults write com.apple.finder ShowAllFiles TRUE echo " Finder settings changed." sleep 1 kill -HUP `ps aux | grep Desktop | grep -v DB | grep -v grep | awk '{print $2}'` echo " Restarting 'Desktop'." echo " Finder will now SHOW all hidden files. Thanks for playing."
Replace the TRUE with FALSE and the SHOW with HIDE and you have a second shell script that restores the default.

Here's my problem -- the method which you described and which I use in the shell script only worked twice. After that I began receiving error messages after I restart the Desktop, and lo-and-behold the files are always hidden.

I would be interested in knowing how others fare if they try this method, either with or without the shellscript.

     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Oct 5, 2000, 03:54 AM
 
From OS 9, I made all the hidden X files visible on the X partition. Then I edited the ".hidden" file at OS X root, to remove all the X files from the hidden list. I left the usual OS 9 hidden files like the Desktop and VolumeSettings stuff.

All files seem to show up now in the X GUI. The list looks the same as the one I see in OS 9. I have not compared file-by-file to make sure of that.
     
Kristoff
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Oct 5, 2000, 12:17 PM
 
Originally posted by reader50:
From OS 9, I made all the hidden X files visible on the X partition. Then I edited the ".hidden" file at OS X root, to remove all the X files from the hidden list.
Bad idea. Those files should remain hidden for general use. And only show up when you absolutely need to see them. I wouldn't recommend doing this to anyone. Besides, this just works on the folders off the root. Not for dot-files further down the i-node tree.
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Kristoff
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Oct 5, 2000, 12:28 PM
 
Originally posted by zeller:

Here's my problem -- the method which you described and which I use in the shell script only worked twice. After that I began receiving error messages after I restart the Desktop, and lo-and-behold the files are always hidden.

I would be interested in knowing how others fare if they try this method, either with or without the shellscript.

You must understand what is really going on here. Not just blindly execute commands...

What is going on, is that OSX is configurable via XML files. That command simply adds a line to the file for the finder that looks like this:

<key>ShowAllFiles</key>
<string>TRUE</string>

Based on what I have seen from these files, an alternative and cleaner form is:

<key>ShowAllFiles</key>
<true/>

This particular file is ~/Library/Preferences/com.apple.finder.plist

So, your script would need to parse the XML and toggle the TRUE to FALSE, or the <true/> to <false/>.
Simply re-executing the same command adds multiple lines, which gives undesired, unpredictable results.

this shows the power of OS X...being XML extensible..XMLX Kinda like how enlightenment and sawfish are LISP extensible, but only XML is much easier to deal with.

[This message has been edited by Kristoff (edited 10-05-2000).]
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
zeller  (op)
Junior Member
Join Date: Dec 1999
Status: Offline
Reply With Quote
Oct 5, 2000, 02:41 PM
 
Originally posted by Kristoff:


Simply re-executing the same command adds multiple lines, which gives undesired,
unpredictable results.

[This message has been edited by Kristoff (edited 10-05-2000).]
Actually, the defaults command does not add additional lines to the com.apple.fi
nder.plist file. It toggles the FALSE and TRUE string, only adding the lines if
they are not already there. This is effectively the same as hand editing the file, or parsing the file and replacing the FALSE with TRUE strings.

However, knowing this still does not solve the problem. It does, however, illuminate the problem. Even after hand editing the file, the Desktop does not reveal hidden dotfiles. Why? Because when the Desktop is HUPed and/or restarted through the GUI, it deletes the com.apple.finder.plist file and restores its own defaults, at least in every case that I have witnessed on my machine. I am guessing this is some sort of error checking routine.

I'll be continuing to plug away at this one.

Ben
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Oct 5, 2000, 04:05 PM
 
-Kristoff

OS X is not for general use today. It is for fooling around, crashing, reinstalling, and generally having fun.

The most interesting non-Mac-like stuff is in those hidden folders.

See you.
     
Kristoff
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Oct 5, 2000, 04:12 PM
 
Originally posted by reader50:
-Kristoff

OS X is not for general use today. It is for fooling around, crashing, reinstalling, and generally having fun.
Well, it is for me...I use it daily. No problems...got classic working with a full extension set, java programming works, and it's prettier than SuSE Linux (what I used to use on my Pismo).


The most interesting non-Mac-like stuff is in those hidden folders.

See you.
I will agree with that !


[This message has been edited by Kristoff (edited 10-05-2000).]
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:07 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,