I have a load of zero length files around in my file system.
I want to first find them, then delete them.
This almost works:
ll -R /moose |grep ' 0 '|awk '{print $9}'|xargs -n 1 -t -i rm -i {}
The problem is that the full path is not returned from the awk, only the filename. So the delete fails...
Does anyone have any ideas how to make this work or be able to point me in the right direction.
Many Thanks
Colin
I want to first find them, then delete them.
This almost works:
ll -R /moose |grep ' 0 '|awk '{print $9}'|xargs -n 1 -t -i rm -i {}
The problem is that the full path is not returned from the awk, only the filename. So the delete fails...
Does anyone have any ideas how to make this work or be able to point me in the right direction.
Many Thanks
Colin