LinuxQuestions.org
Help answer threads with 0 replies.
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 02-09-2012, 01:35 AM   #1
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 293

Rep: Reputation: 32
Writing data to a raw disk using dd


Hi,
I have formatted my pen drive as a raw disk for testing purpose. How can I write data into that using dd ?


Regards,
 
Old 02-09-2012, 01:50 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 192Reputation: 192
Have you tried searching the forum?
Or google?
http://www.linuxquestions.org/linux/...ything_With_DD
http://www.linuxquestions.org/questions/tags/dd/
 
Old 02-09-2012, 05:15 AM   #3
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 293

Original Poster
Rep: Reputation: 32
Actually, I was trying to send few bytes of data directly, but seems dd takes either from file or direct h/w interface.

dd if=/dev/sdc of=new bs=11 count=1

where
if=i/p interface, file to be read
of=o/p interface or file to be written
bs= block size in bytes
count = no of blocks

With Thanks,
Barun
 
Old 02-09-2012, 03:26 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,360

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
If you don't specify an input interface, dd reads from stdin. The data does, after all, have to come from someplace. If you just want to write zeros, or perhaps something random, specify "if=/dev/zero" or "if=/dev/urandom", respectively.
 
  


Reply


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
Writing raw bits to a drive. scarypajamas Programming 13 11-13-2009 10:19 AM
writing raw data to a block device nacio Linux - Software 4 05-17-2007 11:37 PM
writing raw data to a tiff file James_dean Programming 4 10-25-2005 06:03 AM
writing encrypted data to disk rblampain Linux - Security 14 08-01-2005 12:38 AM
Writing encrytped data to a disk tyler_durden Programming 2 04-18-2002 12:18 AM

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

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