Results 1 to 6 of 6
Hi
How do I copy e.g. a zip file from a memory stick/usb in Linux?
Regards
Tebogo...
- 09-15-2009 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 4
[SOLVED] Copy from a memory stick/usb
Hi
How do I copy e.g. a zip file from a memory stick/usb in Linux?
Regards
Tebogo
- 09-15-2009 #2forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,088
Welcome to the forums!
You can take the harder route and copy from the command line, or you can do it the easier way by using any GUI file manager and simply right-click on the item to be copied, choose copy, then navigate to the where you want it and paste it there, or you can drag it there.oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.
- 09-16-2009 #3Just Joined!
- Join Date
- Sep 2009
- Posts
- 4
OZ
Let me re-phrase my question. I need a Linux command to copy a zip file from a memory stick/usb.
Tebogo
- 09-16-2009 #4Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Hi Tebogo,
you need to know if / where your memory stick is mounted
BTW: You need root access to view /var/log/messages and to mount a device.
When you attach a usb device you should see something similar to this in /var/log/messages:
That tells you that the usb device was attached to the system as device sdbCode:Sep 16 10:12:23 dev kernel: usb 1-1: new high speed USB device using ehci_hcd and address 2 Sep 16 10:12:23 dev kernel: usb 1-1: configuration #1 chosen from 1 choice Sep 16 10:12:23 dev kernel: Initializing USB Mass Storage driver... Sep 16 10:12:23 dev kernel: scsi1 : SCSI emulation for USB Mass Storage devices Sep 16 10:12:23 dev kernel: usbcore: registered new driver usb-storage Sep 16 10:12:23 dev kernel: USB Mass Storage support registered. Sep 16 10:12:28 dev kernel: Vendor: Crucial Model: Gizmo! JR. Rev: 0.00 Sep 16 10:12:28 dev kernel: Type: Direct-Access ANSI SCSI revision: 02 Sep 16 10:12:28 dev kernel: SCSI device sdb: 8060927 512-byte hdwr sectors (4127 MB) Sep 16 10:12:28 dev kernel: sdb: Write Protect is off Sep 16 10:12:28 dev kernel: sdb: assuming drive cache: write through Sep 16 10:12:28 dev kernel: SCSI device sdb: 8060927 512-byte hdwr sectors (4127 MB) Sep 16 10:12:28 dev kernel: sdb: Write Protect is off Sep 16 10:12:28 dev kernel: sdb: assuming drive cache: write through Sep 16 10:12:28 dev kernel: sdb: sdb1 Sep 16 10:12:28 dev kernel: sd 1:0:0:0: Attached scsi removable disk sdb Sep 16 10:12:28 dev kernel: sd 1:0:0:0: Attached scsi generic sg1 type 0
fdisk -l will also show the attached drives:
You need to mount the device before you can use it thoughCode:fdisk -l Disk /dev/sda: 17.1 GB, 17179869184 bytes 255 heads, 63 sectors/track, 2088 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2088 16667437+ 8e Linux LVM Disk /dev/sdb: 4127 MB, 4127194624 bytes 255 heads, 63 sectors/track, 501 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 502 4030432 b W95 FAT32Partition 1 has different physical/logical endings: phys=(500, 254, 63) logical=(501, 196, 14)
(mkdir is only required if you don't have a directory to mount the device to)Code:mkdir /mnt/usb mount /dev/sdb1 /mnt/usb
Once that's done, normal *nix commands can be used
for example.Code:cp /mnt/usb/<my file> ~/.
When your done, unmount the device
orCode:umount /dev/sdb1
Code:umount /mnt/usb
RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 09-16-2009 #5Just Joined!
- Join Date
- Sep 2009
- Posts
- 4
Thanks a mil, got it.
- 09-16-2009 #6Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
No worries
RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.



