LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 704|回复: 1

请问用mv如何限制文件数量?

[复制链接]
发表于 2006-3-31 20:38:02 | 显示全部楼层 |阅读模式
一个目录有10万文件,想移动其中5万出来,用mv有没有办法?
发表于 2006-4-1 01:03:17 | 显示全部楼层
Try using loop to calc the count, such as this prototype
  1. while [[ $j -le 50000 ]]; do mv; j=$(($j+1));done
复制代码
When J hits 50000, loop will exist. See if this helps you.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表