Results 1 to 6 of 6

Thread: cant figure out how to copy file from my USB drive

  1. #1
    Join Date
    Aug 2013
    Beans
    4

    cant figure out how to copy file from my USB drive

    Cant figure out how to copy a single file (modem-diagnostics) from my thumb drive. I dont think I need to mount the USB drive because when I insert the usb drive into the notebook a window pops up and shows me the file. So I think its automounted. Please correct me if im wrong.

    so under the command line I wanted to see the file on my usb drive the same way that I saw it in the pop up window by doing the following:

    $ cd media/removable

    So now Im in the removable directory and i type

    $ dir

    and I see USB\ Drive

    so I decided to type: $ cd USB\

    and this I see >

    I have no idea what that means?

    Im just trying to look at the file in the USB directory.

    So my three questions are:

    1) what does it mean when you get the > ?
    2) How can i change the directory to USB to look at the file "modem-diagnostics"?
    3) How can I copy "modem-diagnostics" from my USB to usr/local/bin via the command lines? WHATS THE CORRECT SYNTAX!

    FYI usr/local/bin is created already, its just waiting for the file "modem-diagnostics"

    Also I tried a few ways to get it to work and have not been successful. I list my attempts below. Maybe someone can tell me what im doing wrong.

    1) sudo cp /media/removable\USB\Drive/ modem-diagnostics .
    2) sudo cp /media/removable/USB/Drive\ modem-diagnostics .
    3) sudo cp /media/removable/USB/Drive\ modem-diagnostics
    4) sudo cp /media/removable\ modem-diagnostics .


    Thanks in Advance.

  2. #2
    Join Date
    Apr 2007
    Location
    Staunton, Va. USA
    Beans
    420
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: cant figure out how to copy file from my USB drive

    Have you tried to "drag-n-drop" from the flash drive to your desktop? When on your desktop you can put in the folder that you choose.
    White box computer:Gigabyte GA-A75-UD4H MB,AMD A6 3670 APU, 640GB HD, 8GB RAM, Acer Aspire TimelineX 4820T Laptop, 6GB RAM, 320GB HD, : AcerOneNetbookAO150,1.5GB RAM,120GB HD, AcerAspireOneNetbook725,2GB RAM 320GB HD. All Ubuntu 14.04.2LTS
    .

  3. #3
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    6,811
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: cant figure out how to copy file from my USB drive

    robert22; Hi ! Welcome to the forum .
    To address your questions:
    1. the ">" character is a bash shell interpreter prompt when the shell saw "USB\" it went into "program mode" as what you entered was not a command to bash.
    2. Depends on the version you have installed .. mounting locations have changed recently. Let do a slow walk through and see what is:
    With your usb drive plugged in;
    post the out put -between code (#) tags - of;
    Code:
    ls -la /media/
    ls -la /media/removable
    depending on that out put is what will be advised to discover the response to
    3. Pending

    And yeah, the syntax in ubuntu is different than what you may be accustomed to -> It will not take long to become adjusted !

    just try'n to help
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubutu'n !

  4. #4
    Join Date
    Apr 2012
    Beans
    5,412

    Re: cant figure out how to copy file from my USB drive

    On *nix systems, the path separator character is a forward slash (/) - backslash (\) is for Windows - in *nix, \ is used for 'escaping' things like spaces and control characters, as well as a line continuation character. In particular, typing

    Code:
    cd USB\
    then hitting ENTER tells the shell you want to continue your cd command on the next line - the > is a prompt waiting for you to type more stuff, whereas

    Code:
    cd USB\ Drive
    says "change to the directory (with a space in its name) called USB Drive". So what you probably need is

    Code:
    cp /media/removable/USB\ Drive/modem-diagnostics .
    or

    Code:
    cp "/media/removable/USB Drive/modem-diagnostics" .
    Note that 'sudo' shouldn't be necessary if you own '.' (the current directory)

  5. #5
    Join Date
    Aug 2013
    Beans
    4

    Re: cant figure out how to copy file from my USB drive

    Quote Originally Posted by Bashing-om View Post
    With your usb drive plugged in;
    post the out put -between code (#) tags - of;

    Code:
    ls -la /media/
    ls -la /media/removable
    Does this help you?

    /media/removable $ ls -la /media
    total 4
    drwxrwxrwt 4 root root 80 Aug 27 13:12 .
    drwxr-xr-x 20 root root 4096 Aug 13 08:09 ..
    drwxr-xr-x 2 root root 40 Aug 27 13:12 archive
    drwxr-xr-x 3 root root 60 Aug 27 17:30 removable

    /media/removable $ ls -la /media/removable
    total 4
    drwxr-xr-x 3 root root 60 Aug 27 17:30 .
    drwxrwxrwt 4 root root 80 Aug 27 13:12 ..
    drwxrwxrwx 1 chronos chronos 4096 Aug 27 15:01 USB Drive

  6. #6
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    6,811
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: cant figure out how to copy file from my USB drive

    robert22' Hey !

    Yeah .. what is throwing you is the space in "drwxrwxrwx 1 chronos chronos 4096 Aug 27 15:01 USB Drive"
    USB Drive -> in linux a space is a delimiter..
    try:
    Code:
    ls -la /media/removable/USB\ Drive
    also keep in mind that linux is case sensitive ... "USB" is not the same same as "usb".
    It would simplify things from ubuntu's perspective if you were to change that label to say "USB_Drive" getting rid of that space.

    we will get it right directly
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubutu'n !

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •