Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Wipe first and last megabyte of file

    I need some kind of tool to overwrite the first and last megabyte of a file several times.
    I was thinking about using dd in a script, but I'm not so experienced with it, and the man-page does not show something useful (for this job).

    I've also looked into shred, since I read this on the man-page:
    -s, --size=N
    shred this many bytes (suffixes like K, M, G accepted)
    But I'm not sure if that would delete from the beginning or the end, or event what this command exactly does.

    Edit: Sorry if this is the wrong subforum, I couldn't figure out whether to use this or Misc.

  2. #2
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    dd would probably be your best bet here.
    But I would be careful about using it in a script unless you're very sure about how you're writing it!
    You can find some decent dd tutorials using Google.

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

Posting Permissions

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