need many random files?

Filed under coding, linux, perl

No problem! Here is the solution: filespam

filespam is a small perl script which gives you the possibility of creating many empty files at once in a directory you specify. The file names are random. Here an example:

 
ap0calypse@shu:/tmp> filespam -n 20 -d /tmp/testdir/
20 spam-files created in /tmp/testdir/
ap0calypse@shu:/tmp> ls -l /tmp/testdir/
total 0
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 01o34n9YUk_4
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 @0IH9LUTll_19
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 15giDUJwcj_7
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 1@HKs&Os5r_5
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 83S5CJT4iI_17
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 AX4yu732A7_8
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 $bdiZgBCdt_1
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 dHdaGFGWQZ_11
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 dOuR&c&zpX_13
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 FsK3eDIaE5_3
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 LNf$VHhY4R_16
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 M9ednHvvHE_18
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 mAjtSBPeVJ_15
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 pOHbjOl4T%_10
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 T5URhJtJq2_2
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 t8lGqps%su_6
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 tnBFG%XjMW_9
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 u2$YAp8y&F_20
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 ukWmw&Pb02_12
-rw-r--r-- 1 ap0calypse users 0 2008-06-03 10:53 zzso!5dtcJ_14

As you can see it creates files with special characters in it. If anyone doesn’t like this, change the source code. ;)

3 Comments

  1. stini says:

    hihi check i net… hollerbier???

  2. ap0calypse says:

    hehe :)

  3. chaos says:

    oh! i remember … you told me, 2 years ago in the fly-bar =]

    nice thing!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*