Skip to content

Comment on Rawhide – (rh) find files using pretty C expressions

Comments

This looks very handy, and maps closely to something I use Perl for, but that requires more boilerplate.

But, if you find yourself wanting something like this, and don't want to install anything new... Here's something close in Perl that uses File::stat (this ships with Perl):

  find . -print | perl -MFile::stat -nE 'chomp;$s=stat($_);$s->nlink > 1 && say'

Also see `find2perl`

I use that occasionally when coding up hairy `find` invocations.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.