LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 02-09-2012, 12: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: 260

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, 12:50 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 834

Rep: Reputation: 186Reputation: 186
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, 04: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: 260

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, 02:26 PM   #4
rknichols
Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 209

Rep: Reputation: 82
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing raw bits to a drive. scarypajamas Programming 13 11-13-2009 09:19 AM
writing raw data to a block device nacio Linux - Software 4 05-17-2007 10:37 PM
writing raw data to a tiff file James_dean Programming 4 10-25-2005 05:03 AM
writing encrypted data to disk rblampain Linux - Security 14 07-31-2005 11:38 PM
Writing encrytped data to a disk tyler_durden Programming 2 04-17-2002 11:18 PM


All times are GMT -5. The time now is 09:59 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
Open Source Consulting | Domain Registration