幸福飞过海 - 批量 https://fengqi.me/tag/%E6%89%B9%E9%87%8F/ zh-CN Sat, 18 Jun 2011 10:45:00 +0000 Sat, 18 Jun 2011 10:45:00 +0000 批量建立目录 https://fengqi.me/unix/41.html https://fengqi.me/unix/41.html Sat, 18 Jun 2011 10:45:00 +0000 风起 先看看示例吧:

[wind@windphp test]$ mkdir {1..9}
[wind@windphp test]$ ls
1  2  3  4  5  6  7  8  9
[wind@windphp test]$ mkdir {a..z}
[wind@windphp test]$ ls
1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z

首先是建立1-9的9个目录, 然后是是a-z的26个目录, 这里的范围是可以自定的, 当然了, 范围要合理, 比如字母范围如果是双数就不行了哦.

如果是乱序的, 就麻烦点了. 如下:

[wind@windphp test]$ mkdir {a,1,5}
[wind@windphp test]$ ls
1  5  a
]]>
0 https://fengqi.me/unix/41.html#comments https://fengqi.me/feed/tag/%E6%89%B9%E9%87%8F/