3

I am seeing strange behavior on my user account. After creating a new user account and creating the same folder - Finder behavior is normal.

This is true with directories and files.

1st example: I have a .config folder in my user folder. Finder displays it as a folder with a folder icon until I install BBEdit and restart. Then it displays the .config folder with a BBEdit file icon. To check if the issue was my user account I created a new admin user and created a .config folder for that user. The .config folder is displayed properly - with a folder icon.

2nd example. I am creating files with no extenion using a script. Some of the files are seen as Kind: Document, others are seen as Kind: Unix executable and yet others as Kind: TextEdit.app Document. All of the files were created with the same script using the touch command (the pattern appears to be file names with no white spaces are seen as kind "Document" while file names that have white spaces are seen as kind "Unix executable"). Except.... (maybe just executable bit is set per Ginteras)

Looking inside /etc/paths.d I have two files: 40-XQuartz and 100-rvictl

enter image description here

One is seen as a Unix executable the other as a TextEdit.app Document.

EDIT: Adding a video file to show Finder behavior for the .config folder.

https://www.dropbox.com/s/7su2pah4do0zutd/screenshot%20.config%20bbedit%20directory.mov?dl=0

1 Answer 1

2

100-rvictl is Unix executable because it has +x attribute to it

chmod -x 100-rvictl

chmod +x 100-rvictl
4
  • 1
    You can apply the x attribute to any file. That doesn't mean that it contains executable code. Similarly, the question asks how the other file is interpreted as being a TextEdit.app document.
    – Chenmunka
    Commented Oct 27, 2021 at 9:18
  • Yes, it doesnt mean that it contains executable code. But finder shows kind as "Unix executable" you can create empty file without extension, "touch example" and chmod a+x example, Finder thinks it's "Unix executable" and changes icon for it. If you create empty file "a", no extension and no +x, Finder thinks its a document, and opens it with TextEdit app.
    – Gintaras
    Commented Oct 27, 2021 at 10:27
  • By my knowledge touch always creates files without x attribute, where did you get that extra x attribute might be multiple reasons. Your script chmods it or you accidently chmod it yourself, or 3rd party software chmods it
    – Gintaras
    Commented Oct 27, 2021 at 18:59
  • @Gintaras the script that is running creates both "kinds" the only difference I have noticed is the name of the file. The file that has spaces in the name is always shown as kind "Unix executable", while the file name that has underscores or periods between words is always kind "Document". There is no other variation in the script - it's not chmod'ing some files it creates and not others.
    – John
    Commented Oct 31, 2021 at 0:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .