find is a powerful tool that can not only find files but it can run a command on each matching file too. In this lesson, we’ll learn how to find all the images that match a pattern and run an image optimization tool on them.

FInd files:

find images/ -name "*.png"
find images/ -iname "*.png" # case insensetive

Find folder:

find . -type d -name "images"  # find folder named images

Doing deleting: '-delete'

find dist/ -name "*.built.js" -delete

Run command after finding the matching:  '-exec'

find images/ -name "*.png" -exec pngquant {} \; 

最新文章

  1. 集群下session共享问题的解决方案.
  2. public protect private. 草稿。
  3. Understanding the Internal Message Buffers of Storm
  4. java那些小事---用偶数做判断,不要用基数做判断
  5. jquery 时间运算、格式化的方法扩张
  6. python 发送邮件实例
  7. C安全编码--预处理
  8. CSS3 弹性盒布局模型(转)
  9. Redis学习手册(虚拟内存)
  10. SSH-KeyGen 的用法 【转载】
  11. Python新手学习基础之运算符——成员运算与身份运算
  12. css 实现评分效果
  13. ASP.NET MVC HttpPostedFileBase文件上传
  14. WebLogic重启
  15. 【20190407】JavaScript-indexOf方法解析
  16. CentOS 6.5 搭建 .NET 环境, Mono 5.16.0 + Jexus 5.8
  17. BZOJ4477[Jsoi2015]字符串树——可持久化trie树
  18. android_安装包_NoClassDefFoundError
  19. http认证中的nonce与timestamp解释
  20. 13.11.20 jquery 核心 siblings() 获得同类(不包含自己)循环所有,

热门文章

  1. Perl monks 的 快速回复
  2. fossil 使用
  3. zabbix监控流程图
  4. 如何使用postman访问网站
  5. 条款8:别让异常逃离析构函数(prevent exception from leaving destructors)
  6. tiny4412学习笔记-将uboot、zImage、文件系统烧到emmc中 (转)
  7. 前端基础之JavaScript_1
  8. python对象销毁(垃圾回收)
  9. 事务场景中,抛出异常被catch后,如果需要回滚,一定要手动回滚事务
  10. 【HIHOCODER 1163】 博弈游戏·Nim游戏