LinuxQuestions.org
Review your favorite Linux distribution.
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 04-04-2010, 01:05 AM   #616
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,593

Original Poster
Rep: Reputation: 162Reputation: 162

Strings will omit quite a large number of sectors.

Last edited by AwesomeMachine; 04-04-2010 at 01:21 AM. Reason: forgot something
 
Old 04-05-2010, 10:28 PM   #617
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by AwesomeMachine View Post
Strings will omit quite a large number of sectors.
'strings' has no idea what a sector is or does; it outputs sequences
of printable characters in its input stream. It suppresses characters
w/o a sensible printable representation, and prints candidates for
actual words.

'hexdump' will faithfully let you output any garbage in a presentable
view, e.g.: a column of hex-data and a column of ASCII data in your
incantation; whether or not that is what one wants to see is a totally
different story. As far as recognisable (human readable) strings goes,
'strings' would be my preferred weapon of choice because I wouldn't need
to worry whether a string has been broken over to the next line.



Cheers,
Tink
 
Old 04-13-2010, 03:57 AM   #618
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,593

Original Poster
Rep: Reputation: 162Reputation: 162
Nevertheless, if one wants 5000 sectors, they won't get 2560000 of data using strings. That may, or may not be problematic. I haven't as yet found a solution to the hexdump newline problem.
 
Old 04-16-2010, 03:47 AM   #619
dtdeg
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Rep: Reputation: 0
very usefull and great examples! Thanks
 
Old 04-16-2010, 02:52 PM   #620
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,593

Original Poster
Rep: Reputation: 162Reputation: 162
Smile Your Welcome

Quote:
Originally Posted by dtdeg View Post
very usefull and great examples! Thanks
Dteg,

Thanks for saying it!!

-Awesome
 
Old 05-12-2010, 05:27 PM   #621
zorpox
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
This is one the most awesome posts I've ever seen! It's like being confronted with the compositions of a manic; overwhelming and disturbing at the same time. I sat there gaping as I just go flushed away. I guess, reading this is just like 'dd'ing your own brain with /dev/random .

Above all, it was entertaining and most educating. Many thanks!!

Last edited by zorpox; 05-12-2010 at 05:31 PM.
 
Old 05-12-2010, 11:49 PM   #622
digsecurity
Member
 
Registered: Apr 2010
Posts: 54

Rep: Reputation: 18
It's a great post. Helped me a lot. Keep it up!!!
 
Old 05-13-2010, 01:07 AM   #623
ajeetsinghraina
Member
 
Registered: May 2010
Location: India
Distribution: Ubuntu 7.04/8.04/8.10/10.04, RHEL 6, OpenSUSE,Mandriva,Fedora, CentOS, XandrOS, Slackware, OpenSolar
Posts: 155

Rep: Reputation: 55
I think moderator should award this post as " the Lengthiest thread ever occured"
what you guys say?
 
Old 05-13-2010, 09:07 AM   #624
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,476
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Hi,

Welcome to LQ!

Quote:
Originally Posted by ajeetsinghraina View Post
I think moderator should award this post as " the Lengthiest thread ever occured"
what you guys say?
Not even close to the replies for 'The All New Linux vs Windows MegaSuperThread'.

The views for the 'DD' thread are much higher but not the reply. As for utility, assistance and overall usefulness my vote goes to this 'DD' thread.

 
Old 06-05-2010, 11:22 PM   #625
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,593

Original Poster
Rep: Reputation: 162Reputation: 162
Learn The DD Command has reached a landmark: 500,000 views. I didn't notice right away. As of this reply there are 505,000 views. When I first conceived of a dd post, all I wanted was a place to gather examples of practical dd usage. There was no central repository at that time, and the existing information was haphazardly strew across cyberspace.

I wanted to put the power of dd in the hands of common computer users, not just computer professionals. I'm a computer professional, and I saw the potential for dd in the hands of beginners. When my classmates in grade school were reading childrens' novels, I was reading how to program a mainframe computer. I never liked kids books, not even as a kid. I knew I'd make a living doing something with computers.

Since I became aware of its existence, I always liked linuxquestions.org. It's a great site. I can't think a better place to have the Learn The DD Command thread than a linuxquestions.org. If you happen to run across this reply, and you're not already a member, take the time to join. When I joined I didn't really need help learning Linux. It's just a great community.

There are more deeply technical Linux forums out there, but the idea of Linux is to have fun. If Linux wasn't fun, I'd find some other OS that was fun, and use that. But anyway, this dd thread has had the benefit of Jeremy's SEO skills. It's not just because it's a great thread that got it to over 500,000 views. Jeremy had a lot to do with it. Google lists threads from this site early in the hit list, because the site has an excellent reputation for useful and quality content; and because the site uses good SEO.

I thank Jeremy for helping this thread become popular. I really have no control other than trying to make the thread useful to people the world over. After that my job is done. And nothing is forever. This thread is not immortal. Nine billion years from now it may very well be space dust. A highly advanced race of multidimensional beings may reassemble linuxquestions.org from random debris drifting through space. They'll say to each other, "The kernel has advanced quite a bit during the last nine billion years."
 
Old 06-06-2010, 12:39 AM   #626
iframe
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Rep: Reputation: 0
AwesomeMachine,
Congratulations for the mark set. During the time I have been member of this forum, I learned a lot thanks to the help of all those great people which make this forum.
Thanks!
 
Old 06-17-2010, 02:29 PM   #627
jpantano88
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
Amazing post! Congrats on your latest benchmark!

Quick question: If I do
Code:
dd if=/dev/zero of=/dev/target
Then I can write all 0s to a drive.

But what if I then want to flip every bit on the same drive to a 1?
I'm testing solid state drives and I'm interested in their endurance.

Thanks for your help.
 
Old 06-17-2010, 05:02 PM   #628
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Something like
Code:
while true; do echo -n 1;done | dd of=/dev/target
should do the trick. You may want to experiment with blocksize
to speed things up, e.g.
Code:
dd of=/dev/target bs=2048

Cheers,
Tink
 
1 members found this post helpful.
Old 06-18-2010, 02:20 AM   #629
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,689

Rep: Reputation: Disabled
Good morning Tinkster. As I understand it you propose to write "1"s bit-wise. Lots of bits to be produced by "echo". Would be better to ... here is an earlier attempt to come to grips with this : http://www.linuxquestions.org/questi...v-zero-619626/

HTH the OP.
 
1 members found this post helpful.
Old 06-22-2010, 12:43 AM   #630
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,593

Original Poster
Rep: Reputation: 162Reputation: 162
Thumbs up

Quote:
Originally Posted by jpantano88 View Post
Amazing post! Congrats on your latest benchmark!

Quick question: If I do
Code:
dd if=/dev/zero of=/dev/target
Then I can write all 0s to a drive.

But what if I then want to flip every bit on the same drive to a 1?
I'm testing solid state drives and I'm interested in their endurance.

Thanks for your help.
Hi jpan,

Welcome to LinuxQuestions.org. This should work for you:

dd if=/dev/zero bs=32k | sed 's/\x00/\xff/g' | dd of=/dev/target

0x100h = 1 0000 0000b - 1b = 0xffh = 1111 1111b = 255d. So, 0xffh is hex notation for bitwise 1111 1111. In the example above, dd reads 32k of zeroes (0x00h) from /dev/zero. Sed replaces every 32k of hex zeroes with 32k of hex ff.

This would not work without the \x symbols in the sed perl expression, because without them sed would replace ascii 00 (0x3030h) with ascii ff (0x6666h). Sed would not find ascii 00 in the dd bit stream, so dd would pipe through sed unchanged.

-Awesome

Last edited by AwesomeMachine; 06-22-2010 at 12:46 AM.
 
  


Reply

Tags
backup, best, clonezilla, cloning, command, data, dd, disk, drive, duplicate, erase, explanation, formatting, ghost, hard, image, iso, memory, ping, popular, recover, recovery, rescue, search, security, stick, upgrade, usb, wipe


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Learn The DD command AwesomeMachine Linux - Newbie 17 08-17-2006 05:22 AM
The best way to learn? iz3r Programming 7 02-07-2005 12:00 AM
Best way to learn Linux from the command line patpawlowski Linux - General 2 03-01-2004 04:37 PM
I want to learn C. KptnKrill Programming 14 12-18-2003 02:03 PM
Best way to learn.... InEeDhElPlInUx Linux - Newbie 5 10-11-2003 02:02 AM


All times are GMT -5. The time now is 11:38 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration