ls -lahS | awk ‘{if( $5==0 ) print $8}’ | xargs rm
Alejandro Segovia wrote:
Hey, what about:
find . -size 0 | xargs rm
Cheers!
Posted on 17-Oct-07 at 4:40 pm | Permalink
gus wrote:
If you want to do the same with find you should add a maxdepth, something like this,
find ./* -maxdepth 0 -size 0 | xargs rm
or
find ./* -maxdepth 0 -size 0 -exec rm {} +
Posted on 17-Oct-07 at 4:58 pm | Permalink
Alejandro Segovia wrote:
Hey, what about:
find . -size 0 | xargs rm
Cheers!
Posted on 17-Oct-07 at 4:40 pm | Permalink
gus wrote:
If you want to do the same with find you should add a maxdepth, something like this,
find ./* -maxdepth 0 -size 0 | xargs rm
or
find ./* -maxdepth 0 -size 0 -exec rm {} +
Posted on 17-Oct-07 at 4:58 pm | Permalink