Bug#776614: mention 'before find's "-delete" operator was added'
積丹尼 Dan Jacobson
jidanni at jidanni.org
Thu Jan 29 23:54:40 UTC 2015
Package: perl-doc
Version: 5.20.1-5
Severity: wishlist
File: /usr/share/man/man1/perlrun.1.gz
Mention 'before find's "-delete" operator (or switch?) was added':
Here is an efficient way to delete all files that haven't been
modified for at least a week:
find . -mtime +7 -print | perl -nle unlink
This is faster than using the -exec switch of find because you
don't have to start a process on every filename found. It does
suffer from the bug of mishandling newlines in pathnames, which
you can fix if you follow the example under -0.
More information about the Perl-maintainers
mailing list