LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-07-2013, 07:55 PM   #1
raven4d
Member
 
Registered: Feb 2006
Location: Mars
Posts: 124

Rep: Reputation: 15
dd as a disk wiper ? with advanced options ?


hello , i know this might sound strange , but i need to wipe some sectors every "some sectors"

so if a drive have 1000000000 LBAs
i want to wipe 2 sectors every 10 sectors and so on ...

dd if=/dev/zero of=/dev/sda bs=1024

the upper command should wipe 2 sectors of the selected devise , but how to make it jump over 10 LBAs and write two zero sectors again ? adding seek=5120 ?!?!

thank you
 
Old 06-07-2013, 08:25 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,338

Rep: Reputation: Disabled
You could use a simple for loop:
Code:
for ((i=0 ; i<1000000000 ; i=i+10)); do dd if=/dev/zero of=/dev/sda seek=$i bs=512 count=2 ; done
Neither dd nor dcfldd seem to have a switch to write to every n sectors(s).
 
Old 06-08-2013, 03:04 AM   #3
raven4d
Member
 
Registered: Feb 2006
Location: Mars
Posts: 124

Original Poster
Rep: Reputation: 15
thank you very much sir ;

so i should do a script to do the task ..

excuse my low scripting knowledges but i will write down the script and thank you for our notices .


****************************************
#bin/sh
for ((i=0 ; i<1000000000 ; i=i+10)); do dd if=/dev/zero of=/dev/sda seek=$i bs=512 count=2 ;
done ;
****************************************

then i have to do chmod+x script and just excute it , right ?

thank you again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux wiper malware used in South Korean attack LXer Syndicated Linux News 0 03-22-2013 09:12 PM
sfill - secure free disk and inode space wiper john99 Linux - Software 3 02-11-2011 11:29 AM
advanced Xvid options With ffmpeg mashed Linux - Software 0 04-08-2006 11:41 AM
file wiper jonfa Linux - Security 13 01-17-2005 07:54 AM
Advanced(?) disk partitioning Edaph Linux - Hardware 1 11-29-2004 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration