Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Jun 30 '11 at 3:04

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

    
linux or mac? your prompt says mac, so I changed the tags –  loosecannon Jun 30 '11 at 2:44

4 Answers 4

up vote 19 down vote accepted
# cd /Volumes && ls

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

share|improve this answer

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.

share|improve this answer
    
thanks! i got it with this "cd /volumes/thumbdrive" –  David Jun 30 '11 at 3:30

If you drag and drop the icon corresponding to the volume on the USB drive from the Desktop (or Finder) into the Terminal window, it will automatically paste the path where that volume is mounted. This will most likely be a path in /Volumes.

share|improve this answer

ypuou have to mount it first.

#mkdir /media/myusbstick
#mount /dev/disk3 /media/myusbstick
# cd /media/myusbstick

make a directory, then mount then cd into it

You need to be root to do this, there are ways to set it up so users can mount like common GUI's do, but that is beyond me

EDIT: sorry you tagged your post with linux,?? but you have a mac? This is for linux, if you were curious

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.