Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Unanswered: Create a 2 GB file

    What is the easiest way to create a 2 GB file ?

    I want to see how long this takes on a NFS ..

    Thanks in advance

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Code:
    $ yes >/nfsmount/my2gbfile

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    funny ;-)
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Jun 2004
    Posts
    115
    Hi

    Have a look

    dd if=/dev/zero of=${ 1} megs bs=10000000 count=$1

    try passing different values for $1 and it will create file of different sizes

    The value, 2000, is passed to the script and the dd command creates a file called 2000megs with 100 blocks, each 1MB in size, of buffered zeros


    you could prefix a tiem in front of it to get the timing information like

    time dd if=/dev/zero of=${ 1} megs bs=10000000 count=$1

    regards
    Hrishy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •