Sample Header Ad - 728x90

Why does using touch, to create an empty file with no filetype, create various kinds of files?

2 votes
1 answer
791 views
On macOS I am running a shell script that uses touch to create an empty file without an extension. The files created using the same script randomly have different Kinds, i.e. "Document", "Unix executable", "TextEdit.app Document" with no apparent differences between them. No extended attributes
/usr/bin/touch /Volumes/SDrive/complete/.hashes/"${1}"___"${9}"
variables contain text... example filename: "NOVA.S48E14.Particles.Unknown.720p.WEB.h264___221a636b1f174def7a72d90a9c9d4e9af6aab6ee" I am curious why an empty file with no extension would be interpreted to be anything other than Kind "Document" when created with the touch command, and if there is a method to specify without using an extension? I have not been able to test this on any other OS.
Asked by John (149 rep)
Oct 21, 2021, 04:13 AM
Last activity: Oct 21, 2021, 06:56 AM