main_dir, I have a lot of sub-folders say
DFT150, and in each directory, there is a file named
OSZICAR. However, some of this would have file size 0.
So I would like to have a script, that goes into each folder and checks the size of
OSZICAR, if it is below size of 10 bytes, then delete its
The pseudo-code (which doesn't work), I have is:
for f in *; do cd $f status=(check whether OZICAR has size below 10bytes) cd .. if (status); do rm -r $f fi done