public/wallpaper配下の対象の特定の画像をavifencする
find -E public/wallpaper/ -type f -iregex '.*\.(jpeg|jpg|png|webp)$' -exec sh -c 'rm "$1"' _ {} \;
-name '.(png|JPG|jpeg)'みたいに指定できないの、初めて知った。
この、特定ディレクトリに対して一括処理するワンライナー、使いたい場面がよくある。
public/wallpaper配下の対象の特定の画像をavifencする
find -E public/wallpaper/ -type f -iregex '.*\.(jpeg|jpg|png|webp)$' -exec sh -c 'rm "$1"' _ {} \;
-name '.(png|JPG|jpeg)'みたいに指定できないの、初めて知った。
この、特定ディレクトリに対して一括処理するワンライナー、使いたい場面がよくある。