how to cd into a thumb drive from terminal ( Mac OSX )

How do i change into the directory of my thumbdrive? I've been poking around and see that this command, "diskutil list", lists all my local disks. That produces this..

David-Adamss-MacBook-Pro:~ davidadams$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            249.7 GB   disk0s2
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *4.0 GB     disk3
   1:                 DOS_FAT_32 THUMBDRIVE              4.0 GB     disk3s1

now i see that my thumbdrive is showing up in /dev/disk3 but i can't get to it. I can cd into /dev but thats as far as i can get.

"cd /dev/disk3/THUMBDRIVE" tells me "-bash: cd: /dev/disk3/THUMBDRIVE: Not a directory"

any help would be great.


Solution 1:

# cd /Volumes && ls

It will show you the directory location of all mounted volumes. Then just cd into the drive you want.

Solution 2:

Mac OS X mounts drives automatically under /Volumes.

mress:10042 Z$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS mress HD                999.9 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *1.0 TB     disk1
   1:        Apple_partition_map                         32.3 KB    disk1s1
   2:                  Apple_HFS mress™                  1.0 TB     disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.5 TB     disk2
   1:                        EFI                         209.7 MB   disk2s1
   2:                  Apple_HFS Development             512.2 GB   disk2s2
   3:                  Apple_HFS Media                   987.7 GB   disk2s3
mress:10043 Z$ ls /Volumes
Development/ Media/       mress HD@    mress™/

You'll notice the directories match the NAME column.

Solution 3:

In Terminal, if you

ls /Volumes

you'll see all of your drives. You can then cd to one of them (or just cd directly - no need to list the volumes first). For example:

cd /Volumes/My\ Other\ Drive

Spaces are replaced by '\ '. Or you can put the whole thing in quotes:

cd /Volumes/"My Other Drive"

If the drive name has no spaces, then you'd just use the name:

cd /Volumes/MyOtherDrive