LoginSignup
0
0

More than 5 years have passed since last update.

00000から99999までの連番ファイル名で10万個のファイルを作成するコマンド

Last updated at Posted at 2018-01-31

嫌がらせとかで使えます。

$ seq 0 99999 | xargs printf '%05d\n' | xargs touch
  • seq 0 99999 で0から99999までの連番を生成します(0 1 2 3 .... 99999)
  • xargs printf '%05d\n' でseqが生成した数を5桁のゼロ埋め形式に変換します(123 -> 00123)
  • xargs touch で標準入力から渡ってきた文字列をファイル名として空のファイルを作成します
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0