Hey, list,

This is kind of a pedestrian request, but hey, it's like 104 degrees outside.

I wanted to remove all empty files in a directory today, so I typed
this command:

  ls -s | grep -e '^ 0' | sed 's/^...//' | xargs -n1 rm -v

Then I was like, WTF, three pipes?  And I wondered how many variations
on this kind of thing there were.  There's also this one, which I just
pulled from http://www.linux.ie/newusers/beginners-linux-guide/find.php:

  find . -empty -maxdepth 1 -exec rm {} \;

 But maybe you have a better one?  Or if not, maybe you can share your
favorite one-liner?

Andrew
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to