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

    List folder/file path length as a number

    Scheduled Pinned Locked Moved IT Discussion
    7 Posts 2 Posters 351 Views
    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

      Apple and Linux usage.

      Is there anyway to jump into a folder and run a simple command, and then list the character count in the path?

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

        I was thinking something along the lines of pwd but that won't explore the path.

        I'm more looking for "check here for long paths, list the path, and the character count if the path is above # characters long"

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          Not quite what you want, but will do what you need....

          find -regextype posix-extended -regex '.{257,}'
          

          Replace the 257 with whatever length you want to search for as a threshold.

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

            @scottalanmiller That could work. . .

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller
              last edited by

              It's the low hanging fruit approach.

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

                @scottalanmiller said in List folder/file path length as a number:

                It's the low hanging fruit approach.

                The repetitive of this is what I was considering, and piping it out to something.

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @DustinB3403
                  last edited by

                  @dustinb3403 said in List folder/file path length as a number:

                  @scottalanmiller said in List folder/file path length as a number:

                  It's the low hanging fruit approach.

                  The repetitive of this is what I was considering, and piping it out to something.

                  Use that to make a script and an email alert!

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