GNU Find tricks

From D3xt3r01.tk
Jump to navigationJump to search

WHY

Because I find myself searching files I want to do stuff to ...

HOW

Find and delete directories

find . -type d -exec rm -rf {} \;

Find and count files

find . -type f | wc -l

Find all files and move them in the current dir

find . -type f -exec mv {} `pwd` \;