Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a FreeBSD machine that I have to copy everything off the drive. The fielsystem is UFS and not readable by any other operating system. (great...)

I have a USB flash drive (FAT32) I need to copy everything to from the SATA in the bsd machine.

I looked up cp commands, and got it to partially work, but it seems to copy to the wrong directory. I cannot find out the "name" of the USB drive, and if it can even copy to it.

share|improve this question

migrated from Mar 18 '11 at 10:31

This question came from our site for professional and enthusiast programmers.

@sergey ? Surely you mean ? – Majenko Mar 18 '11 at 10:39

The USB drive will be mapped as a SCSI Direct Access device - i.e., /dev/da**

If it is the only SCSI direct access device in the system (which is likely) it will be /dev/da0

Typing: ls /dev/da* should confirm this. If it is the only device you should see /dev/da0 /dev/da0s1 returned.

You would then need to mount that device in order to access it:

# mount -t msdosfs /dev/da0s1 /mnt

(s1 is the first 'slice' or partition on the disk)

You can then copy the data with cp <whatever> /mnt

When you have finished, and before you unplug the USB device you must unmount the device:

# umount /mnt

If you don't you risk data corruption on the USB stick.

share|improve this answer

On FreeBSD you first need to mount your USB-drive.
(See man mount). As I remember mount 'what' 'where'
For example: mount /dev/ad10f1 /mnt/mydisk

Use mount -t msdos /dev/da0s1 /mnt/mydisk (where da0s1 is your usb-drive)
Then use cp command

Or you can install Samba-server and you'll be able to work with UFS-system in Windows.

share|improve this answer
FreeBSD maps the USB to SCSI Direct access (/dev/da*) – Majenko Mar 18 '11 at 10:38

You must log in to answer this question.