ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved Finding specific file type that has no extension

    IT Discussion
    osx postscript fonts files move management
    3
    7
    779
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DustinB3403D
      DustinB3403
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • DustinB3403D
        DustinB3403 @Obsolesce
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • black3dynamiteB
          black3dynamite
          last edited by

          https://www.lifewire.com/file-linux-command-unix-command-4097142

          DustinB3403D 1 Reply Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403 @black3dynamite
            last edited by DustinB3403

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

            1 Reply Last reply Reply Quote 0
            • DustinB3403D
              DustinB3403
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • ObsolesceO
                  Obsolesce
                  last edited by Obsolesce

                  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.

                  DustinB3403D 1 Reply Last reply Reply Quote 1
                  • DustinB3403D
                    DustinB3403 @Obsolesce
                    last edited by

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post