Was sorting through some old directories of books and wanted to see which files were not actual text documents (or some related files such as images). The GNU find command is simply amazing:
[code]find . -regextype posix-egrep -type f ! -iregex ‘.*\.(txt|pdf|mobi|epub|htm|jpg|djvu|doc|rtf|gif|html|docx)’ [/code]
GNU find is part of the findutils package in Cygwin, Debian, and most other Linux distros.
Leave a Reply
You must be logged in to post a comment.