How to transmit a file from Linux to USB drive

This is a discussion on How to transmit a file from Linux to USB drive within the C Programming forums, part of the General Programming Boards category; Hi there, I'm working on application that permits myself to transfer a file located in my file system into a ...

  1. #1
    Registered User s1rUK's Avatar
    Join Date
    Jun 2010
    Posts
    1

    How to transmit a file from Linux to USB drive

    Hi there,

    I'm working on application that permits myself to transfer a file located in my file system into a usb device (FAT32). I have to use Bulk Transfer Only mode that means to use stream of characters only. I looked through the LibUsb library using it in my IDE I can transmit a string. To transfer a whole file I suppose I've to dodge the file system building a char sequence that permits to recognise a file in the file system and to put it into the usb device.


    Suggestions?

  2. #2
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    Couldn't you just use copyfile() and supply the file path to the usb volume? What do you mean by bulk transfer? If you talk about writing to the raw device, I don't see how you could do that and respect for your FAT32 filesystem.

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    All forms of file copying/transfer are, fundamentally, just about char streams.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 02:04 PM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 08:54 AM
  3. Totally confused on assigment using linked lists
    By Uchihanokonoha in forum C++ Programming
    Replies: 8
    Last Post: 01-05-2008, 04:49 PM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 05:54 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 11:12 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21