Skip to content

How to find files by the length of filename

by admin on July 7th, 2014

To find files by specific name you can use:

echo ???????log.?
this will print files with name access_log.1 for e.g.

echo ????? will print all files which have 5 character names or print ????? if there is none of these.

to recursively find these files you can use find:

find . -name "?????" -type f 

From → Uncategorized

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS