Hi there, I'm a long time Windows, Unix and Linux user and have recently been swayed into Mac conversion of my main personal computing environment for home use.
As most would expect I'm struggling with the difference in thinking in many of the conventions Mac OS X uses compared to my well trained muscle memory of Windows and X, but I continue to push on.
I am finding myself dropping to a terminal window to complete some routine tasks that I can do much more quickly than figure out OS X way of handling, but I'm finding several strange behaviors that I am hoping folks better versed in this BSD clone Darwin that's underpinning OS X can explain.
1. Why can't I use the gui text editor to open certain system files? e.g. /etc/hosts - (ANSWERED - Apple has explicitly limited this - I'm a little worried about this recent answer I found. Without consistency of execution it becomes pretty hard to trust the OS you're working with...)
2. cp command - this is and my next question are so simple I fear the wrath I may get from them, but please be patient - trying a basic copy of files in the same directory but changing their extension at the same time. e.g. I've shrunk several audio files (.m4a) into ringtone length and want to rename the files to .m4r. I would normally use the command 'ren' in DOS to a do a single file or move but a 'copy' is less volitile if I mess up the syntax at least I don't lose my source files. Syntax I would use in Unix/Linux and that I've been trying to make work in Darwin under OS X 10.7.2 is 'cp *Ringtone*.m4v *.m4r' - but it just gives me the usage of the command. I've tried moving all of the files I want to rename into a new directory through the GUI and from terminal in the new directory run the following 'cp *.m4a *.m4r', but I get the same results - nothing happens except I get a response indicating the syntax of the command is:
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
I've checked the man page to see if it was a "special" version of cp, but don't see anything that should preclude this from working.
3. same as #2 but with 'mv' instead of 'cp' - I must be doing something wrong...I just can't see it yet. Any help would be appreciated.
4. And this is what has prompted me to finally post something. In exasperation of my problems above I was typing good 'ol 'ls - l' alot - those who use RedHat probably know the builtin alias of 'll" and use it regularly - obviously Darwin doesn't have that alias so I went to create it - no dice, running 'alias' with no parameters just returns a prompt with no error message. the command 'alias ls 'ls - l' ' returns the following:
-bash: alias: ls: not found
-bash: alias: ls -l: not found
What the heck is that? the man page indicates that alias is there and is a builtin command (as I would expect) but I can't run it? I've even gone so far as to log in as root and tried it with the same results - I'm *really* hoping some Mac experts can hit me with a, "Silly Rabbit, just turn on xxxx feature and all your terminal command woes will cease..."
Thanks in advance for any assistance the more knowledgeable might be able to provide....
As most would expect I'm struggling with the difference in thinking in many of the conventions Mac OS X uses compared to my well trained muscle memory of Windows and X, but I continue to push on.
I am finding myself dropping to a terminal window to complete some routine tasks that I can do much more quickly than figure out OS X way of handling, but I'm finding several strange behaviors that I am hoping folks better versed in this BSD clone Darwin that's underpinning OS X can explain.
1. Why can't I use the gui text editor to open certain system files? e.g. /etc/hosts - (ANSWERED - Apple has explicitly limited this - I'm a little worried about this recent answer I found. Without consistency of execution it becomes pretty hard to trust the OS you're working with...)
2. cp command - this is and my next question are so simple I fear the wrath I may get from them, but please be patient - trying a basic copy of files in the same directory but changing their extension at the same time. e.g. I've shrunk several audio files (.m4a) into ringtone length and want to rename the files to .m4r. I would normally use the command 'ren' in DOS to a do a single file or move but a 'copy' is less volitile if I mess up the syntax at least I don't lose my source files. Syntax I would use in Unix/Linux and that I've been trying to make work in Darwin under OS X 10.7.2 is 'cp *Ringtone*.m4v *.m4r' - but it just gives me the usage of the command. I've tried moving all of the files I want to rename into a new directory through the GUI and from terminal in the new directory run the following 'cp *.m4a *.m4r', but I get the same results - nothing happens except I get a response indicating the syntax of the command is:
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
I've checked the man page to see if it was a "special" version of cp, but don't see anything that should preclude this from working.
3. same as #2 but with 'mv' instead of 'cp' - I must be doing something wrong...I just can't see it yet. Any help would be appreciated.
4. And this is what has prompted me to finally post something. In exasperation of my problems above I was typing good 'ol 'ls - l' alot - those who use RedHat probably know the builtin alias of 'll" and use it regularly - obviously Darwin doesn't have that alias so I went to create it - no dice, running 'alias' with no parameters just returns a prompt with no error message. the command 'alias ls 'ls - l' ' returns the following:
-bash: alias: ls: not found
-bash: alias: ls -l: not found
What the heck is that? the man page indicates that alias is there and is a builtin command (as I would expect) but I can't run it? I've even gone so far as to log in as root and tried it with the same results - I'm *really* hoping some Mac experts can hit me with a, "Silly Rabbit, just turn on xxxx feature and all your terminal command woes will cease..."
Thanks in advance for any assistance the more knowledgeable might be able to provide....
Last edited: