CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Reading an entire disk

 



blindmonkey
New User

Feb 11, 2008, 6:04 AM

Post #1 of 4 (299 views)
Reading an entire disk Can't Post

Hi all. I need to know how to read/write the entire contents of a disk (along with a file system, everything). Also I need to know how to read/write a file in binary mode, I'm not sure if Perl does this by default, I've only worked with text files.

Thanks in advance to anyone who helps.


KevinR
Veteran


Feb 11, 2008, 11:38 AM

Post #2 of 4 (288 views)
Re: [blindmonkey] Reading an entire disk [In reply to] Can't Post

use binmode() on the filehandle you want to write in binary mode . I don't understand the first part of your question.
-------------------------------------------------


blindmonkey
New User

Feb 11, 2008, 4:03 PM

Post #3 of 4 (284 views)
Re: [KevinR] Reading an entire disk [In reply to] Can't Post

To explain further, my final goal is to copy an image of a flash drive (like an iso. I want to be able to copy all the partitions along with it) to a file or another flash drive. To do this, I need functions to read and write individual bytes/sectors/etc on the actual device.

I'm sorry if I was being vague.


(This post was edited by blindmonkey on Feb 11, 2008, 7:43 PM)


KevinR
Veteran


Feb 11, 2008, 9:36 PM

Post #4 of 4 (278 views)
Re: [blindmonkey] Reading an entire disk [In reply to] Can't Post

Sorry, I don't know how to do that.
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives