Finding human-readable files on unix
问题 I'd like to find human-readable files on my linux machine without a file extension constraint. Those files should be of human sensing files like text, configuration, html, source-code etc. files. Could you suggest a way to filter and locate. 回答1: find and file are your friends here: find /dir/to/search -type f -exec sh -c 'file -b {} | grep text &>/dev/null' \; -print this will find any files ( NOTE: it will not find symlinks directories sockets etc only regular files ) in /dir/to/search and