This command will find files of zero size:
find . -size 0
A filename returned might be
filename.001
I am looking for a one liner that will delete files found with this, plus any that have the same filename with a different extension (which would be non-zero sized), so these files would be deleted too:
filename.txt
filename.bak
filename.ZZz
Best Answer
explanation:
${f%.*}
(readman bash
)rm
all other files with the same base