I have a hard time writing simple script using find command. I want to delete files with given size in some directory. I want to be able to specify names of files (like Efficiency_*) and size of files to delete. I tried following script:
#!/bin/bash
CD=($pwd)
find $CD -name $1 -size $2 -delete
I am running it from the correct directory as follows:
/path/to/directory/script.sh 'Efficiency_*' '-500c'
but it does not work.
What is the correct way to do it?