Finding specific file type that has no extension



  • Post Script 1 Fonts.... ffs over 20 years old.

    Anyways we have tons of these and I would like to move every Post Script Type 1 file to a different folder and leave everything else in-place where it is.

    These files have no extension, just the "Kind" is listed as PostScript Type 1.

    Looking for ideas, since I can't target an extension, and I can't think of how to accurately target an empty extension.



  • @Obsolesce said in Finding specific file type that has no extension:

    Is there anything inside the file that can tell you? For example, if you write a script that cats each file or whayever and looks for specific string, then moves it if it matches.

    I don't know what those files are, so ya. Just thinking out loud without any info.

    No, because they are just ancient like ~20 + years old, no extension or really anything to hit on. Apple still supports Postscript Type 1 fonts, but nothing else does.

    I managed to get it to work with what I needed with the above.

    Additionally I created two reports 1) listing all of he postscript type 1 fonts and 2) listing truetype and opentype fonts.

    So now we can build a list of things that needs to get upgraded.

    To find the non-extension'd postscript type 1 fonts I used

    find . -type f -d -empty >> old-crap.txt

    To find the modern fonts I used

    find . -name '*.ttf' -d >> modern-font.txt and just replaced .ttf with .otf, .otc, .ttc, .tte and .dfont and appended the same modern-font.txt file for each of those.





  • @black3dynamite I've already tried to use file and I get a blank response to stout.



  • Small correction, if I search individual file by file with

    file filename do I get some output, specifically file name: empty

    What I'd ideally want to do is find any file that is empty and move those to a different folder.



  • I think I got it to work, albeit without the move portion, just a straight delete.

    find . -type -d -empty -delete appears to have done what I needed.



  • Is there anything inside the file that can tell you? For example, if you write a script that cats each file or whayever and looks for specific string, then moves it if it matches.

    I don't know what those files are, so ya. Just thinking out loud without any info.



  • @Obsolesce said in Finding specific file type that has no extension:

    Is there anything inside the file that can tell you? For example, if you write a script that cats each file or whayever and looks for specific string, then moves it if it matches.

    I don't know what those files are, so ya. Just thinking out loud without any info.

    No, because they are just ancient like ~20 + years old, no extension or really anything to hit on. Apple still supports Postscript Type 1 fonts, but nothing else does.

    I managed to get it to work with what I needed with the above.

    Additionally I created two reports 1) listing all of he postscript type 1 fonts and 2) listing truetype and opentype fonts.

    So now we can build a list of things that needs to get upgraded.

    To find the non-extension'd postscript type 1 fonts I used

    find . -type f -d -empty >> old-crap.txt

    To find the modern fonts I used

    find . -name '*.ttf' -d >> modern-font.txt and just replaced .ttf with .otf, .otc, .ttc, .tte and .dfont and appended the same modern-font.txt file for each of those.