Domanda

I want to find and delete all the "similar files as shown below" recursively from the specified directory of my Linux Server by Using COMMAND LINE....

"file.php?p=10&file=load%2Fnew Animations 1%2FAwesome_flowers-(text1).gif&sort=0"

"file.php?p=10&file=load%2Fnew Games 1%2FAwesome_flowers_-(text1).gif&sort=1"

Note: All these files having different file sizes and The mathed text is in all files is "file.php?p***"

È stato utile?

Soluzione

This should help you to delete files recursively..

find /path/to/dir -type f -name 'file.php\?p*' -exec rm -i {} \;

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top