Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command to delete 0 Kb files with php 1

Status
Not open for further replies.

ElTech

IS-IT--Management
Apr 16, 2003
22
US

I'm looking for a command for Redhat 8 that deletes 0 Kb files with extension .php including files located inside sub-directories

Thanks for your help in advance
 
From the top of your directory tree:

find . -size 0 -name '*.php' | xargs rm

BUT try it with an xargs ls -la first to check the correct files are being found.

HTH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top