Finding the Unix path of a firewire drive

Posted:
in Genius Bar edited January 2014
I was wanting to do some experimenting and to do that I need to know the Unix path of a firewire drive. Is there an easy way to do that?



Ty
«1

Comments

  • Reply 1 of 22
    jbljbl Posts: 555member
    Look in /Volumes
  • Reply 2 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by JBL

    Look in /Volumes



    Ok I'm trying to do that but dir does not work, when I try cd /volumes/"the name of the drive" it reports that no such volume exists.



    So I guess my question is how exactly do I look into /Volumes?
  • Reply 3 of 22
    mikefmikef Posts: 698member
    The filesystem is case sensitive... "Volumes" is not the same as "volumes". Try "cd /Volumes".
  • Reply 4 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by mikef

    The filesystem is case sensitive... "Volumes" is not the same as "volumes". Try "cd /Volumes".



    Computer:~ $ cd /Volumes

    Computer:/Volumes $ /Zee Disk

    -bash: /Zee: No such file or directory

    Computer:/Volumes $ dir

    -bash: dir: command not found

    Computer:/Volumes $ cd /Volumes/Zee Disk

    -bash: cd: /Volumes/Zee: No such file or directory

    Computer:/Volumes $



    This is what I tried but can't get past this point/
  • Reply 5 of 22
    mikefmikef Posts: 698member
    You have to quote (or escape) any volume name with a space in it...



    On my system:



    cd /Volumes/Macintosh\\ HD



    or



    cd "/Volumes/Macintosh HD"



    'ls' is the command for getting a directory listing.
  • Reply 6 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by mikef

    You have to quote (or escape) any volume name with a space in it...



    On my system:



    cd /Volumes/Macintosh\\ HD



    or



    cd "/Volumes/Macintosh HD"



    'ls' is the command for getting a directory listing.




    Computer:/Volumes $ cd /Volumes/Zee\\ Disk

    Computer:/Volumes/Zee Disk $ ls

    Applications System iNode12022737

    Desktop DB Temporary Items iNode81229126

    Desktop DF Users mach

    Desktop Pictures Volumes mach.sym

    Keychains automount mach_kernel

    Movie.mp4 bin private

    Movies cores sbin

    Network dev tmp

    PatchBurn3.1en etc usr

    Preferences iNode10616414 var

    Computer:/Volumes/Zee Disk $





    Thanks allot!!
  • Reply 7 of 22
    You can also use the mount command.
  • Reply 8 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by mikef

    You have to quote (or escape) any volume name with a space in it...



    On my system:



    cd /Volumes/Macintosh\\ HD



    or



    cd "/Volumes/Macintosh HD"



    'ls' is the command for getting a directory listing.




    OK, attempting to use with dd gets me this:



    dd bs=512x8 if=/Volumes/Zee\\ Disk/Movies of=/Volumes/disk\\2

    dd: /Volumes/Zee Disk/Movies: Is a directory

    0+0 records in

    0+0 records out

    0 bytes transferred in 0.005186 secs (0 bytes/sec)



    Movies is actually a file, and I tried to copy the whole disk.
  • Reply 9 of 22
    mikefmikef Posts: 698member
    What are you trying to do? Backup an entire disk? 'dd' isn't the right tool.



    I use rsync for backups (tar and 'cp -r' would probably do as well), but if you're not comfortable at a shell prompt, I would recommend any one of the many backup utilities available on OS X.
  • Reply 10 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by mikef

    What are you trying to do? Backup an entire disk? 'dd' isn't the right tool.



    I use rsync for backups (tar and 'cp -r' would probably do as well), but if you're not comfortable at a shell prompt, I would recommend any one of the many backup utilities available on OS X.




    No I'm trying to backup a working disk to prove that dd works but in the future I want to use it to copy a damaged HD.



    http://www.macosxhints.com/article.p...382&query=unix
  • Reply 11 of 22
    mikefmikef Posts: 698member
    Fair enough.



    just as a word of warning, don't expect the process to be as simple or cut-and-dry as the note seems to indicate. Chances are when the disk is dead, nothing is going to help including 'dd'. Typically, dead disks are not readable.



    Keep good backups and then you won't have to worry about trying to recover data on a failed disk.
  • Reply 12 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by mikef

    Fair enough.



    just as a word of warning, don't expect the process to be as simple or cut-and-dry as the note seems to indicate. Chances are when the disk is dead, nothing is going to help including 'dd'. Typically, dead disks are not readable.



    Keep good backups and then you won't have to worry about trying to recover data on a failed disk.




    This works if I go file by file, but the output is not visible.



    dd bs=512x8 if=/Volumes/Zee\\ Disk/ of=/Disk\\2/foo.dmg

    dd: /Disk2/foo.dmg: Not a directory



    If I go straight to Disk2 then no problem other than I cannot see the file. If I call the output file "foo.dmg" I get the above error. Not a directory



    I have tried to send it to Disk 2.dmg but I cannot see that image.
  • Reply 13 of 22
    mikefmikef Posts: 698member
    Do you have a folder "/Disk2" or did you mean something else?
  • Reply 14 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by mikef

    Do you have a folder "/Disk2" or did you mean something else?



    I have a harddrive partition named Disk 2
  • Reply 15 of 22
    mikefmikef Posts: 698member
    Wouldn't that be mounted under "/Volumes/Disk 2" and not "/Disk2"?
  • Reply 16 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by mikef

    Wouldn't that be mounted under "/Volumes/Disk 2" and not "/Disk2"?



    That's it, sorry I thought that I tried that, already. I think that I tried /volumes, instead of /Volumes. The output is foo.dmg which is as it is supposed to be but I cannot mount the image.



    dd bs=512x1000 if=/Volumes/Zee\\ Disk/Movie.mp4 of=/Volumes/Disk\\ 2/foo.dmg

    2275+1 records in

    2275+1 records out

    1165063033 bytes transferred in 69.536074 secs (16754800 bytes/sec)



    Ty



    edit: OK it is not a disk image, if I output to foo.mp4 everything is fine, but I should be able to copy the whole disk or at least a folder, does anybody know how to do that??
  • Reply 17 of 22
    mikefmikef Posts: 698member
    You cannot use dd to backup folders, you use it for backing up entire partitions (as the document you quoted explains).
  • Reply 18 of 22
    brendonbrendon Posts: 642member
    Quote:

    Originally posted by mikef

    You cannot use dd to backup folders, you use it for backing up entire partitions (as the document you quoted explains).



    I found the 'if' and 'of' paths by using df -h, all works well.



    Ty
  • Reply 19 of 22
    johnqjohnq Posts: 2,763member
    You can get the full unix path to anything by dragging its icon into a Terminal window.



    (Except sidebar items - so use the alternatives such as the proxy icon in the titlebar when the drive is selected, the desktop icon if you have it set to show, or go up in the "paths" list in the Finder and drag the Firewire drive's icon.)
  • Reply 20 of 22
    mikefmikef Posts: 698member
    Quote:

    Originally posted by Brendon

    I found the 'if' and 'of' paths by using df -h, all works well.



    Ty




    As "ThinkingDifferent" mentioned previously, "mount" works as well for showing where volumes are mounted.
Sign In or Register to comment.