In summary, if I use ls -l it yields something for a directory like...
drwxr-xr-x
and the reported error for a directory with files in it, is it shows as a standard file and ls -l yields...
-rwxr-xr-x
My goal is to find a way to manually change file type from "-" to "d" on existing files or directories.
My first post here. For days I've been trying to find a way to change file type for a file in Apple OSX (BSD Unix). This may be so much easier than I am making it. Original problem was the tool that comes with OSX to check your hard disk is Disk Utility (DU) and it shows file permissions errors it cannot repair. Sometimes it is a couple hundred. Most are the kind where a directory file is showing as a standard file, and should be changed to directory. If I navigate there with Terminal, the expected files are in the directory. These errors may occur from Passive Hack attack over the last year. One fix that works is wipe and install OSX. It is a new good HDD.
The first method I had planned to use, is to find file header information on the disk sectors with a hex editor like R-Studio for Mac, and simply do my hex math if necessary and change the data. It will take extensive time to learn enough R-Studio to do this. Plus I think I need a map of how BSD Unix lays information onto HDD sectors, so that I can locate the bits that label file as directory or standard file, or pipe, or socket. The map would resemble this but with logical data layout for a BSD file. https://en.wikipedia.org/wiki/Advanced_Format
Been to several forums and Apple support and R-Studio support. Stopped short of paying $99 to join Apple Developers to get this information. I think it is open anyway since BSD Unix.
Other tools I explored were Apple's IDE Xcode, Unix dd command, and emacs. Because I'm new with Unix it takes me a very long time, and I still see no method to accomplish this. In the tutorial for Xcode, it mentions that recommended tools show up when hovering over menu icons. When I hovered over the file type it showed emacs, but after reading, I think it means whether it is a text file or executable file type. Not directory and such.
At this point I'm back to looking for the logical file layout that BSD Unix puts onto the disk sectors, and then use R-Studio.
Any ideas?