Results 1 to 3 of 3

Thread: Linux way to display all folder/folder/file longer than 250 characters?

  1. #1
    Join Date
    Nov 2007
    Beans
    139

    Linux way to display all folder/folder/file longer than 250 characters?

    I have a lot of folders with long names. Some of them can be slimed down by rephrasing them or placing them other places.

    My windows machine running Windows Explorer won't open sub folders when I exceed a certain character limit.

    Is there a command or app that will show me all the long folder/file names so I can rename them?

    I don't want to have windows machines not be able to access them. Or WORSE do something like this /Pictures/Trips/2007/Country/blah/blah/~1 Which I have seen before.

  2. #2
    Join Date
    Jun 2007
    Beans
    1,745

    Re: Linux way to display all folder/folder/file longer than 250 characters?

    Code:
    cd
    find * | grep ".\{20,\}"
    replace 20 with any number you want.

    EDIT: you might, want to pipe this to less, or put it into a file:
    Code:
    ## do it with less(produces a list you scroll using the arrows, space etc, q to exit)
    cd; find * | grep ".\{20,\}" | less
    ## store it to a file on the desktop call "too_long.txt"
    cd; find * | grep ".\{20,\}" > ./Desktop/too_long.txt
    EDIT 2: I've not set it to 250, because there will be more on the file name that just the path from your home directory, you will have the drive name(C:, E:, whatever) and the path through your home folder(eg /home/bob/ ) on top of this that you will have to account for.
    Last edited by scragar; October 25th, 2008 at 04:00 AM.
    Licat volaré si superturgum Aquila volat

  3. #3
    Join Date
    Nov 2007
    Beans
    139

    Re: Linux way to display all folder/folder/file longer than 250 characters?

    Works Great. Thanks!

    Cool simple little dealy-os like this is why Linux rocks!
    Last edited by Mysticle31; October 26th, 2008 at 05:16 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •