Command to find file/path lengths that are too long for burning to DVD?
With GNU find (on Linux or Cygwin), you can look for files whose relative path is more than 255 characters long:
find -regextype posix-extended -regex '.{257,}'
(257 accounts for the initial ./
.)
I found 2 ways of doing this:
find . | perl -pe 'print (length($_)-1)." ";' | sort -rn | less
find . | awk '{print length,$0}' | sort -rn | less
My first attempt (find . | perl -pe 'print length;' | sort -rn | less) at the command using perl reported a character count that's too high by one, as I think it includes a newline character in its count? It can probably be done more cleanly than my above method, but I got the result I needed.