file search and delete in ubuntu command line

Search file using name

find -name "*.php" -printf "%s %p\n"

find -name “*.php” -printf “%s %p\n” -delete

Search file using name and count number of file

find -name “index.php” -printf “%s %p\n” | wc -l




Leave a Reply