Two Guys Arguing

Notes to self: Find all files NOT containing text

Posted in Uncategorized by benjaminplee on 02.09.10

Handy script to find all files in a given subfolder that do NOT contain a certain text line. Sorted for easy reading:

find ./PATH/TO/FOLDER -type f -size +1c ! -exec grep -q ‘SEARCH TEXT’ {} \; -print | sort

Follow

Get every new post delivered to your Inbox.