dumb shell fzf(1) trick for deleting multiple disjoint files

Often times I want to delete files based on something in the filename that isn't really able to be done with a glob. Commonly that's a bunch of podcast downloads and I want to delete the ones that don't interest me:

$ ls | fzf -m --print0 | xargs -0 rm

I can type filenames to quick-filter and use tab/shift+tab to select/deselect those files, and press «enter» to delete them.

If you don't have spaces or other weird characters in your filenames, you can skip the "--print0" and "-0" options.

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.bsd.cafe/users/gumnos/statuses/114558758064487138 on your instance and quote it. (Note that quoting is not supported in Mastodon.)