aicul, thank you. That's a tip I can use and will heed in the future.
jmpage2 (or anybody), how do I change drives in terminal mode? The files are on an external harddrive.
Is there are list of the most common terminal commands somewhere?
The bigger issue is how to undo a bug in the Mac OS that changes permissions on big files for no apparent reason, and with no way to reverse it without digging down into the raw terminal commands.
Steve
To change "drive" (it's not that much changing drive on Mac OS X/Linux and so on as it is on Windows since it is just another directory) you should list the contents of the directory /Volumes/:
In the output you should find your external drive. Then change to the "drive"(/directory) of your external drive.
The ouput should look something like this:
Code:
ls -l /Volumes
total 36
drwxrwxr-x 14 aron staff 544 Apr 9 21:59 Backups
drwxrwxrwx 1 aron staff 32768 May 19 23:15 SCRATCH
lrwxr-xr-x 1 root admin 1 May 19 23:59 System -> /
Where the first column is the permissions on the directory (the first letter is a d which indicates that it is a directory, user, group and everyone). The third is the owner (user) of the group wheres the fourth is the owner group. After that we have the size (in bytes) Then comes last modification date and last we have the name of the directory (files can also been shown).
Code:
cd /Volumes/Name\ Of\ Directory
Hey! What the h*ll did he just do there? There were no back-slashes (\) in the name from the ls output? Well you have to escape the spaces or else the terminal will think that there will be a new parameter to the command.
If we hadn't put the back-slashes before the spaces in the directory name cd would have tried to change to the directory /Volumes/Name which doesn't exist resulting in an error (cd: no such file or directory: /Volumes/Name). One method to simplifie the typing of complex command names or paths is to use the <tab> key. If you type the following (and press the tab-key when there is <tab> mark) you should get the following result:
Code:
ls /Vol<tab> => ls /Volumes/
cd /Vol<tab> => cd /Volumes/Name<tab> => cd /Volumes/Name\ Of\ Directory/
As you can see the terminal will auto-add the back-slashes for you. Very handy!
One more thing to note is that the terminal is case-sensitive. /Volumes/Name is NOT the same thing as /volumes/name.
Oh and a short(?) list of commands that will work in the terminal:
http://www.ss64.com/osx/
If you have more questions feel free to ask.