How to find files with filenames that are too long
February 19, 2014 in SoftwareHere’s a neat regular expression trick that you can use to find pathnames longer than a certain length, say, 20 characters:
find -E . -regex '.{20,}'
If you only need filenames that are too long (without the path), the regex is a bit more complicated:
find -E . -regex '.*[^/]{20,}$'
Liked the post? Treat me to a coffee