Find and basename not playing nicely

前端 未结 4 1700
無奈伤痛
無奈伤痛 2020-12-13 05:55

I want to echo out the filename portion of a find on the linux commandline. I\'ve tried to use the following:

find www/*.html -type f -exec sh -c \"echo $(b         


        
4条回答
  •  佛祖请我去吃肉
    2020-12-13 06:47

    Thats how I batch resize files with imagick, rediving output filename from source

    find . -name header.png -exec sh -c 'convert -geometry 600 {} $(dirname {})/$(basename {} ".png")_mail.png' \;
    

提交回复
热议问题