GNU Find tricks

From D3xt3r01.tk
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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` \;