2
I am using Mac OS X 10.6.4 and am struggling with the command:
diskutil
Whenever I type in diskutil the terminal says:
-bash: diskutil: command not found
Does anyone know what the problem might be? Can I install the diskutil script (probably by copying some *.sh to some destination and adding something to the bash.profile)?
While this is almost true, there are a few things you can do as a non-root user, list partitions, view the information on a mount point, etc. Basically the same stuff you can do inside of Disk Utility without unlocking it. Anything that actually presents a risk to data on disk will require root privs. – peelman – 2010-11-20T16:14:29.077
1Actually, this answer is wrong on a couple of counts: first, OS X keeps sudo is in /usr/bin, not sbin; second, /sbin and /usr/sbin are in the default PATH for standard users as well as admins. – Gordon Davisson – 2010-11-20T17:18:53.630
OSX Mavericks, and /usr/sbin/diskutil isn't there. – OrangeDog – 2014-03-12T11:02:33.393
@OrangeDog Oh, do you know where it is? I don't have access to any OSX machine. Is
diskutil
on the default path? – Gilles 'SO- stop being evil' – 2014-03-12T11:55:48.987@GordonDavisson This answer claims nothing about where
sudo
is. Evidently/usr/sbin
(which is wherediskutil
was in OSX at the time) wasn't in Maccaius's PATH; was/usr/sbin
in the default PATH in 10.6.4? – Gilles 'SO- stop being evil' – 2014-03-12T11:58:13.150I don't have a 10.6.4 system handy, but under both 10.6.8 and 10.9.2, the default PATH is
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
,diskutil
is in/usr/sbin
, andsudo
is in/usr/bin
. So, bothsudo
anddiskutil
have been in the default PATH for a long time and are still there. Not sure whydiskutil
is missing on @OrangeDog's Mac... – Gordon Davisson – 2014-03-12T16:06:51.267