A while ago, I had to transfer a couple of files from a Linux machine where I did have console access, but no proper network access.
This was the sequence to get it connected and copy a directory to the USB flash drive:
- Stick the USB flash drive in a USB port (duh <g>) on the Linux system
- Run the fdisk command to see on which device it got loaded:
# fdisk -l
It will give you something like this:
Disk /dev/sdd: 8019 MB, 8019509248 bytes
20 heads, 16 sectors/track, 48947 cylinders
Units = cylinders of 320 * 512 = 163840 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 * 1 48948 7831512 b Win95 FAT32 - Create a
/mnt/USBdirectory to mount the device to using themkdircommand:
# mkdir /mnt/USB - Use the
modprobecommand to make sure thevfatfile system support is loaded:
# modprobe vfat - Use the
mountcommand to mount the device from the first step (/dev/sdd1) to the directory you created (/mnt/USB)
# mount /dev/sdd1 /mnt/USB - Use the
rsynccommand to recursively (-p) copy a directory maintaining timestamps (-t) and showing progress (-v)
# rsync -rtv /home/user/directory/ /mnt/USB/directory/ - Use the
umountcommand to unmount the directory (and therefore the device)
# umount /mnt/USB
–jeroen







