LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 02-05-2010, 10:29 AM   #601
catbird
LQ Newbie
 
Registered: Oct 2006
Posts: 26

Rep: Reputation: 16
I'd like to have this in hardcopy


This has been very helpful. I'd like to download and print it. Consider a handbook or book. I'd buy it!
 
Old 02-05-2010, 02:35 PM   #602
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,064
Blog Entries: 1

Rep: Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374Reputation: 1374
Hi,

Quote:
Originally Posted by catbird View Post
This has been very helpful. I'd like to download and print it. Consider a handbook or book. I'd buy it!
You can use the 'Thread Tools' to show a printable version then print it.

 
Old 02-09-2010, 09:22 AM   #603
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,591

Original Poster
Rep: Reputation: 162Reputation: 162
Smile A Book?

Quote:
Originally Posted by catbird View Post
This has been very helpful. I'd like to download and print it. Consider a handbook or book. I'd buy it!
I have written several books. None of them are about Linux. The first one will be released November 2010.

Thank you for the encouragement. I'll write a dd book sometime during the next two years.

-Awesome
 
Old 02-11-2010, 03:44 AM   #604
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,644

Rep: Reputation: Disabled
Please keep us informed. I am interested as well. Good job and thanks, AwesomeMachine
 
Old 03-06-2010, 09:15 AM   #605
Penguin01
LQ Newbie
 
Registered: Dec 2009
Posts: 23

Rep: Reputation: 15
This is a brilliant thread, but I am stuck on a particular issue.

I am trying to dd a certain number of bytes from my USB. So, for example, byte 1000 to 5000 of my 512MB USB stick.

From what I have looked at, the command looks as follows:
dd if=/dev/sdb of=/home/user/file.txt seek=1000 count=5000

But is this correct?



Thanks!
 
Old 03-06-2010, 04:07 PM   #606
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,966
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
In what way are you "stuck"?
 
Old 03-07-2010, 08:32 AM   #607
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu 12.04LTS
Posts: 258

Rep: Reputation: 31
Cool

Dear Tinkster,

Quote:
Btw, I'll rather attempt to aid you in helping yourself than
giving you a "turn-key solution". I believe in enabling people
to help themselves, rather than carrying them everywhere. ;}
This is a noble, and for the most part, an intelligent approach.
However, giving the exact code sequence is often more helpful in many circumstances. The snippet of code that works is an example of proven success and in itself easily becomes a 'tool' that one can embellish, diminish etc.
Personally, I learn more from annotated 'good code' than by reading and trying to figure out arcane 'descriptions' found in MAN pages etc.
It could be that both approaches are quite valid.
Matthew
 
Old 03-07-2010, 10:31 AM   #608
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,966
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally Posted by drmjh View Post
Dear Tinkster,



This is a noble, and for the most part, an intelligent approach.
However, giving the exact code sequence is often more helpful in many circumstances. The snippet of code that works is an example of proven success and in itself easily becomes a 'tool' that one can embellish, diminish etc.
Personally, I learn more from annotated 'good code' than by reading and trying to figure out arcane 'descriptions' found in MAN pages etc.
It could be that both approaches are quite valid.
Matthew

Now why exactly do you think it's a good idea to comment
on my signature in a thread on dd?



Cheers,
Tink
 
Old 03-07-2010, 10:57 AM   #609
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,043

Rep: Reputation: 83
Quote:
Originally Posted by Penguin01 View Post
This is a brilliant thread, but I am stuck on a particular issue.

I am trying to dd a certain number of bytes from my USB. So, for example, byte 1000 to 5000 of my 512MB USB stick.

From what I have looked at, the command looks as follows:
dd if=/dev/sdb of=/home/user/file.txt seek=1000 count=5000

But is this correct?



Thanks!
Looking through the man pages that looks correct. However I am not sure I am reading the count right. IE I am thinking that it is saying it will copy 5000 bytes from the initial stating byte or 1000. So in short (if I am reading this correctly) it would copy 1000 to 6000. I would try changing count = 4000 and see if it gets what you are looking for. You can always backup the results and try different values.

Best way to learn is through mess ups and experimentation.
 
Old 03-13-2010, 05:57 AM   #610
Penguin01
LQ Newbie
 
Registered: Dec 2009
Posts: 23

Rep: Reputation: 15
That seems to work, thank you jstephens84.

But even if I save it into a text file (called file.txt, for example), I still cannot open it.
Is there a reason why, I cannot see the contents of the dd output?
 
Old 03-13-2010, 06:33 AM   #611
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
If you use dd to put a partition image into a file---the file will not be a text file (even if you add the "txt" extension).

You can read **any** file with something like hexdump.
 
Old 03-13-2010, 08:38 AM   #612
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,043

Rep: Reputation: 83
Quote:
Originally Posted by Penguin01 View Post
That seems to work, thank you jstephens84.

But even if I save it into a text file (called file.txt, for example), I still cannot open it.
Is there a reason why, I cannot see the contents of the dd output?
Normally if I am going to output parts of a hard disk I am just going to dump those parts to say an external hard drive or another partition. The reason you just can open those text files is because you Possibly tried to insert binary data into a text document.
 
Old 03-27-2010, 11:03 PM   #613
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,591

Original Poster
Rep: Reputation: 162Reputation: 162
Post Skip, Count

Quote:
Originally Posted by Penguin01 View Post
This is a brilliant thread, but I am stuck on a particular issue.

I am trying to dd a certain number of bytes from my USB. So, for example, byte 1000 to 5000 of my 512MB USB stick.

From what I have looked at, the command looks as follows:
dd if=/dev/sdb of=/home/user/file.txt seek=1000 count=5000

But is this correct?



Thanks!
If you want to read the USB drive, and write the bytes 1000 to 5000:

dd if=/dev/sdc1 skip=1000 count=4000
 
Old 03-27-2010, 11:09 PM   #614
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,591

Original Poster
Rep: Reputation: 162Reputation: 162
Post Leave off 'of='

Quote:
Originally Posted by Penguin01 View Post
That seems to work, thank you jstephens84.

But even if I save it into a text file (called file.txt, for example), I still cannot open it.
Is there a reason why, I cannot see the contents of the dd output?
If you leave out of= dd will print to the screen. If you want to read the output:

dd if=/dev/sdc1 | hexdump -C | less

Less would be my favorite editor, except you can't edit with it.
 
1 members found this post helpful.
Old 03-28-2010, 06:03 PM   #615
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Rep: Reputation: Disabled
hi

I prefer strings so if above awesome command is awesome ignore mine

Code:
su
dd if=/dev/sdc1 | strings | less

Last edited by aus9; 03-28-2010 at 06:05 PM.
 
  


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


All times are GMT -5. The time now is 05:47 PM.

Main Menu
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