From: srikanth on 10 Aug 2010 11:06 Hi All, Just wanted to know if we can generate data with given input size with the help of shell script. Any idea from our group? If we specify 5mb as file size then we need to generate test data for 5mb. If you have any valuable suggestions please let me know and also any alternative way to do this. Thanks in advance.
From: pk on 10 Aug 2010 13:30 On Tue, 10 Aug 2010 08:06:47 -0700 (PDT) srikanth <srikanth007m(a)gmail.com> wrote: > Hi All, > Just wanted to know if we can generate data with given input size with > the help of shell script. Any idea from our group? > > If we specify 5mb as file size then we need to generate test data for > 5mb. If you have any valuable suggestions please let me know and also > any alternative way to do this. It entirely depends on what you want to put in that data. If you're happy with NULs, just use dd if=/dev/zero bs=1000 count=5000 (or the equivalent values in base 2, depending on what unit you want to use). For more structured data, awk or Perl can easily generate just about anything.
From: srikanth on 10 Aug 2010 23:48 On Aug 10, 10:30 pm, pk <p...(a)pk.invalid> wrote: > On Tue, 10 Aug 2010 08:06:47 -0700 (PDT) srikanth <srikanth0...(a)gmail.com> > wrote: > > > Hi All, > > Just wanted to know if we can generate data with given input size with > > the help of shell script. Any idea from our group? > > > If we specify 5mb as file size then we need to generate test data for > > 5mb. If you have any valuable suggestions please let me know and also > > any alternative way to do this. > > It entirely depends on what you want to put in that data. If you're happy > with NULs, just use > > dd if=/dev/zero bs=1000 count=5000 > > (or the equivalent values in base 2, depending on what unit you want > to use). > > For more structured data, awk or Perl can easily generate just about > anything. First of all Thanks for you suggestions... I Just want to generate files with data. Any type of data that doesn't depend upon the content what it is.. How can we do this with the help of awk or perl?
From: Barry Margolin on 10 Aug 2010 23:55 In article <9a7c7480-8de2-4c39-9da9-15fd9b11179f(a)i19g2000pro.googlegroups.com>, srikanth <srikanth007m(a)gmail.com> wrote: > On Aug 10, 10:30�pm, pk <p...(a)pk.invalid> wrote: > > On Tue, 10 Aug 2010 08:06:47 -0700 (PDT) srikanth <srikanth0...(a)gmail.com> > > wrote: > > > > > Hi All, > > > Just wanted to know if we can generate data with given input size with > > > the help of shell script. Any idea from our group? > > > > > If we specify 5mb as file size then we need to generate test data for > > > 5mb. If you have any valuable suggestions please let me know and also > > > any alternative way to do this. > > > > It entirely depends on what you want to put in that data. If you're happy > > with NULs, just use > > > > dd if=/dev/zero bs=1000 count=5000 > > > > (or the equivalent values in base 2, depending on what unit you want > > to use). > > > > For more structured data, awk or Perl can easily generate just about > > anything. > First of all Thanks for you suggestions... > I Just want to generate files with data. Any type of data that doesn't > depend upon the content what it is.. > How can we do this with the help of awk or perl? If you use /dev/random in the above command, you'll get the specified amount of random bytes. -- Barry Margolin, barmar(a)alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***
From: srikanth on 11 Aug 2010 11:04
On Aug 11, 8:55 am, Barry Margolin <bar...(a)alum.mit.edu> wrote: > In article > <9a7c7480-8de2-4c39-9da9-15fd9b111...(a)i19g2000pro.googlegroups.com>, > > > > srikanth <srikanth0...(a)gmail.com> wrote: > > On Aug 10, 10:30 pm, pk <p...(a)pk.invalid> wrote: > > > On Tue, 10 Aug 2010 08:06:47 -0700 (PDT) srikanth <srikanth0...(a)gmail..com> > > > wrote: > > > > > Hi All, > > > > Just wanted to know if we can generate data with given input size with > > > > the help of shell script. Any idea from our group? > > > > > If we specify 5mb as file size then we need to generate test data for > > > > 5mb. If you have any valuable suggestions please let me know and also > > > > any alternative way to do this. > > > > It entirely depends on what you want to put in that data. If you're happy > > > with NULs, just use > > > > dd if=/dev/zero bs=1000 count=5000 > > > > (or the equivalent values in base 2, depending on what unit you want > > > to use). > > > > For more structured data, awk or Perl can easily generate just about > > > anything. > > First of all Thanks for you suggestions... > > I Just want to generate files with data. Any type of data that doesn't > > depend upon the content what it is.. > > How can we do this with the help of awk or perl? > > If you use /dev/random in the above command, you'll get the specified > amount of random bytes. > > -- > Barry Margolin, bar...(a)alum.mit.edu > Arlington, MA > *** PLEASE post questions in newsgroups, not directly to me *** > *** PLEASE don't copy me on replies, I'll read them in the group *** It should contain human readable data not he system readable data. If i use dd if=/dev/random it is generation some system level data which we can't read. |