Help accessing external drive

ssmith11

Registered
Hi I am trying access an ibook in target disk mode via terminal. I see the following:

ssmiths-Computer:~ ssmith$ ls -l /Volumes
total 8
drwxrwxr-t 27 root admin 952 Apr 18 09:26 LaCie
drwxrwxr-t 29 root admin 1020 Apr 18 08:54 Macintosh HD
drwxrwxr-t 33 root admin 1156 Apr 18 09:27 SSDATA HD
lrwxr-xr-x 1 root admin 1 Apr 18 08:53 ssMacintosh HD -> /

I am trying to access folders on the Macintosh HD.

I am new to the command line and tried :
ssmiths-Computer:~ ssmith$ ls -f Macintosh HD
ls: Macintosh: No such file or directory

as you can see - I failed.

Thanks for any help
 
You need to escape the space

Not: ls -f Macintosh HD

but: ls -f Macintosh\ HD

The backslash tells the system to accept the space as a literal character. Or you can use quotes

ls -f "Macintosh HD"
 
ssmiths-Computer:~ ssmith$ sudo cd "Macintosh HD"
/usr/bin/cd: line 4: cd: Macintosh HD: No such file or directory
ssmiths-Computer:~ ssmith$ cd Macintosh\ HD
-bash: cd: Macintosh HD: No such file or directory
ssmiths-Computer:~ ssmith$
 
I restarted my computer with the target disk (Macintosh HD) as the startup disk. I could run terminal from there and do what I wanted.

I would still love to know how to move between drives (volumes) from the command line.

Thanks
 
If I understood your prompt rigth, you did the cd "Macintosh HD" on your
home directory. Use cd /Volumes/Macintosh\ HD instead.

BTW. Depending on the shell you are using, pressing the <TAB> -key might
help: type cd /Volumes/Ma<TAB> and it should expand it to
cd /Volumes/Macintosh\ HD .
 
Also, I noticed you used "sudo cd Macintosh\ HD". It runs the cd -command
as root, but after it has run it, the command returns to yourself, on your
current directory.
 
Back
Top