Find: Difference between revisions

From Anthony Pastor Wiki Notes - Verba volant, scripta manent
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
find /tmp/ -regextype posix-egrep -regex '.{10,}' -delete
find /tmp/ -regextype posix-egrep -regex '.{10,}'
</syntaxhighlight>
</syntaxhighlight>

Revision as of 16:52, 19 February 2016

Find 40 files newer than a specific date and list them sorted by modification time

find /var/lib/kafka/Views* -mindepth 1 -newermt "feb 02 2016" -print0 | xargs -r0 stat -c %y\ %n | sort | tail -40

Find filenames greater than 10 characters

find /tmp/ -regextype posix-egrep -regex '.{10,}'