LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-07-2021, 01:18 AM   #1
wdssharp
LQ Newbie
 
Registered: Dec 2021
Posts: 2

Rep: Reputation: Disabled
Confirming device contains only zeros


I have wiped several hard drives with either dc3dd or dcfldd and would like to check if they are indeed wiped with zeros. I would like to not scroll through page after page of zeros, but only see the first line and any line thereafter with data other than zero. My commands were:
sudo dc3dd hwipe=/dev/sda hash=md5
sudo dcfldd if=/dev/zero of=/dev/sda bs=8k

Would using xxd or hexdump confirm the above?
 
Old 12-07-2021, 01:26 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,144

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
From memory "hd -C ..." should do the job. Will take a while - maybe test on a subset first.
 
1 members found this post helpful.
Old 12-07-2021, 02:29 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
Quote:
Originally Posted by wdssharp View Post
but only see the first line and any line thereafter with data other than zero.
Both od and hexdump do this by default. xxd only when -a/-autoskip is specified.
 
1 members found this post helpful.
Old 12-07-2021, 06:05 AM   #4
wdssharp
LQ Newbie
 
Registered: Dec 2021
Posts: 2

Original Poster
Rep: Reputation: Disabled
Something like this?

sudo xxd -a /dev/sda
 
Old 12-07-2021, 06:08 AM   #5
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
Exactly.
 
1 members found this post helpful.
Old 12-07-2021, 06:12 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334
grep -qP '[^\x00]' /dev/sda
https://askubuntu.com/questions/1065...ytes-in-a-file
 
1 members found this post helpful.
  


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
Confirming a secure custom Chroot jail mikeyt_333 Linux - Security 7 04-13-2006 11:42 AM
Need comferting / confirming :( Slith(++1) Linux - Security 8 09-08-2005 08:29 AM
list all contains and subdirectories' contains babis Linux - Newbie 2 10-22-2004 09:40 PM
Confirming and testing Nvidia drivers are installed LinuxBAH Linux - General 5 06-30-2003 12:53 AM
Confirming Debian Version dunkyb Linux - General 2 02-22-2003 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:53 PM.

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