Find the answer to your Linux question:
Results 1 to 2 of 2
Hi everyone, I'm rather new to Linux, and need to find a way of corrupting a file. I think I may need to use dd to do this, but am ...
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    1

    Deliberately corrupting a file

    Hi everyone,

    I'm rather new to Linux, and need to find a way of corrupting a file. I think I may need to use dd to do this, but am unsure of the syntax. I'm also a little wary as I understand that you can trash your entire disk if you get it wrong! If anyone is able to help me with with this, or to suggest another method, I shall be very grateful.


    Martyman

  2. #2
    Linux Newbie tiersen's Avatar
    Join Date
    May 2008
    Location
    Tokyo,Japan
    Posts
    226
    the syntax is
    Code:
    dd if=path/inputfilename of=path/outputfilename bs=blocksize
    here is an example dd if=/dev/null of=path/filename bs=1024
    Be very carefull with dd. It's a very useful but very dangerous command as you can delete your entire disk with it. I recommend you take a look at the dd manpage before proceeding
    "If we lived in a world where the better technology won out, then no doubt everybody and their aunt Fanny would be using GNU/Linux"
    Sam Varghese

Posting Permissions

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