mach alias, mach.sym, automount

Joined
Nov 3, 2006
Messages
51
Reaction score
2
Points
8
i don't have 'shows hidden files' enabled but for some reason when i right click on my harddrive icon in the dock for a quick view, i get the hidden files mach, mach.sym and automount visible. this is just a minor nuisance as they don't appear in the finder but how do you get them to be invisible again in the dock quick view. ive tried renaming them with the . prefix in the terminal but they just reappear again. any ideas?
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
Does anyone know how to make a file invisible from Terminal.app? i.e. is there a command line command to do this?

I know that ANY file whose first letter is a dot is invisible. However, the above files aren't named in this way. I wonder what XRay is changing to make them invisible? Inquiring minds need to know... :)
 
Joined
Oct 27, 2005
Messages
4,702
Reaction score
404
Points
83
Using Terminal.
If you are at least a bit familiar with Unix and prefer to use Terminal to accomplish this toggling of invisibility status, you can easily do so. One advantage of using Terminal is that files that are otherwise invisible in the Finder can be easily listed in Terminal.
For starters, you can accomplish the same changes just described with Property List Editor by using the defaults command. Specifically, to make invisible files visible, type the following: defaults write com.apple.finder AppleShowAllFiles Yes.

To toggle the invisibility bit of a single file, however, you’ll again need help from Apple's Xcode Tools software. This time you need a Unix program called SetFile. You'll find it, together with a collection of other Unix software, in the /Developer/Tools directory.

By default, the software in the Tools directory will not run simply by typing the name of the program (there are many ways to resolve this inconvenience, but that's a subject for another article). Here's the quickest and easiest way to put SetFile in action and use it modify a file's invisibility status:

Launch Terminal.
Open the /Developer/Tools folder in the Finder. Locate SetFile and drag its icon to the terminal window. The Directory path for SetFile (/Developer/Tools/SetFile) should appear in the Unix command line prompt.
Type: -a V . Leave a space after the upper case V.
Locate the file that you want to make invisible. Drag its icon to the Terminal window. Its path should now be added to the same command line prompt.
Thus, for our aforementioned MyDoc file on the Desktop, when you are done doing all of the above, the command line should look like this:


/Developer/Tools/SetFile -a V /Users/homedirectoryname/Desktop/MyDoc
where homedirectoryname is the name of your home directory (mine is landau, for example).


That is just a teaser from this site.
 
Joined
Jan 4, 2006
Messages
1,385
Reaction score
146
Points
63
Location
Hamburg, Germany
Your Mac's Specs
MacBook Pro | iMac(2.1 G5) | MacBook(2.16 C2D) | MacMini (1.67 CD) | iPhone 4 | iPad (3rd Gen)
To show hidden files
defaults write com.apple.finder AppleShowAllFiles TRUE

To hide
defaults write com.apple.finder AppleShowAllFiles FALSE
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
Thanks Pulse-8!

It is not as simple as I had hoped. I knew that there wasn't a standard *nix command for it, and I was hoping that the Mac OS X had perhaps added a simple command for it. I see that they have, but not made it exactly intuitive to use!

However, the real gem here, and one that I did not know, is that by simply dragging any file from anywhere, into the Terminal window, you place its full pathname onto the command line. Now that is what I call integration!! Excellent!!
 
OP
R
Joined
Nov 3, 2006
Messages
51
Reaction score
2
Points
8
MacHeadCase
i downloaded xray and used it to make those three files invisible. it worked and i deleted xray as i have no other use for it and didnt want it. now only mach.sym is back. is this an os x bug? do i need to keep the xray plugin it installs?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top