[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. [seesea@bathome test]$ echo "aa" > atimetool_1.9.6.deb
  2. [seesea@bathome test]$ echo "aa" > atimetool_1.9.7.deb
  3. [seesea@bathome test]$ ls
  4. atimetool_1.9.6.deb  atimetool_1.9.7.deb
  5. [seesea@bathome test]$ for f in *; do mkdir ${f/.deb/} && mv $f ${f/.deb/}; done;
  6. [seesea@bathome test]$ ls
  7. atimetool_1.9.6  atimetool_1.9.7
  8. [seesea@bathome test]$ ls *
  9. atimetool_1.9.6:
  10. atimetool_1.9.6.deb
  11. atimetool_1.9.7:
  12. atimetool_1.9.7.deb
  13. [seesea@bathome test]$ for d in *; do mv $d/* .; rm -rf $d; done;
  14. [seesea@bathome test]$ ls
  15. atimetool_1.9.6.deb  atimetool_1.9.7.deb
复制代码

TOP

  1. # 移入目录
  2. [seesea@bathome test]$ for f in *; do mkdir ${f/.deb/} && mv $f ${f/.deb/}; done;
  3. # 移出目录
  4. [seesea@bathome test]$ for d in *; do mv $d/* .; rm -rf $d; done;
复制代码

TOP

返回列表