Hi Bald Brick.
Thanks for the correction. Never needed it so far, so I didn't know its limits. No asterisk needed with the -R option, good to know.
So, in one line
mount /dev/sdX /home/mymame/old-hdd && chown -R 500:500 /home/myname/old-hdd?
Almost. You should not try to mount the whole drive /dev/sdX
; you should mount the partitions on it, /dev/sdXn
. (If there's only one partition on the drive, n
will be 1.)
Also note that the mountpoint has to exist before you manually can mount anything on it, so if /home/myname/old-hdd
doesn't, you should create a subdirectory called old-hdd
mkdir -p /home/<username>/old-hdd
(In this case the -p
option is not really necessary.)
When you let the system mount removable media or other partitions semi-automatically under /media
it creates the mountpoints on the fly. When you do the mounting yourself the mountpoints have to exist before you can do it.
And then there's actually a tiny difference between
chown -R 500:500 /home/myname/old-hdd
chown -R 500:500 /home/myname/old-hdd/*
The first command will change the owner and group of the old-hdd
folder and everything in it; the second will change owner and group of everything in the folder but not of the folder itself.