PDA

View Full Version : Help with basic linux commands


cosmos
09-08-2006, 11:42 PM
Hello all,

I have tried searching both here and google/ask but was unsuccessful.

I am having trouble copying files from my USB drive to my FreeBSD router. More to the point, I am unable to get the command correct for me to switch over to the USB drive as the cd. I know the USB drive is connected and recognized as I get the following on the console:

umass0: Sandisk, addr2
da0 at umass-sim0 bus 0 target 0 lun 0

I thought the command would be 'cd /da0' and 'cd /umass0' but it just returns no such file or directory. I won't go into all the combinations I've tried.

I'm sure that it's simple command.

TIA

morpheus6d9
09-09-2006, 12:26 AM
did you mount the device

cosmos
09-09-2006, 12:38 AM
I was trying to use 'mount -t msdos | /dev/da0' but I got permission denied. Was hoping since it was recognized it was auto mounted. Guess I'm too used to windows/mac >:l

penguin
09-09-2006, 01:27 AM
Try mounting it as root - that might work. If it works, run 'chmod 666 /dev/da0' and try mounting it as a normal user.

EDIT: I just re-read your command. Take the pipe ( '|' ) out of the middle of it (mount -t msdod /dev/da0)

cosmos
09-10-2006, 06:53 PM
if I don't have the pipe in there, it spits the correct usage at me. I tried chmod but still nothing...

it doesn't have a man for anything either..

HHunt
09-10-2006, 07:22 PM
The correct command is "mount -t msdosfs /dev/da0s1 /mnt/whatever", where /mnt/whatever is a (preferably empty) directory of your choice. If it succeeds, that's the directory the files will show up in.
The device might not be da0s1. Check in /dev what da0* devices you have (ls /dev/da0*) if it complains, and try the one with the longest name.

And do this as root. When you get it working we'll look at making it possible as a normal user, but for now logging in as root will eliminate one potential source of problems.

BTW, if you have the disk space, install the man pages. There's no good reason not to.
As a fallback, you can use their man online (http://www.freebsd.org/cgi/man.cgi) service.

cosmos
09-10-2006, 07:41 PM
awesome, thanks! The '/mnt' was what I needed.

I installed a SA router package (pfsense) and it didn't include the man pages.

Thanks for your help and the resource.