|
|
any "sudo" command experts?
|
|
|
|
Forum Regular
Join Date: Jan 2005
Status:
Offline
|
|
I want to type this:
sudo mv \
/System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj \
/System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj.disabled
----------------------
Below "sudo mv \"
do I type the rest in on one line (allowing wrap-around)?
how is "\" or "/" used next to each other? Is there space between the bottom 2 lines? (/System/Library...)
|
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Apr 2001
Location: Wasilla, Alaska
Status:
Offline
|
|
It should be:
Code:
sudo mv /System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj /System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj.disabled
You should be able to copy and paste that whole line, and press return.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Nov 2002
Location: More Cowbell...
Status:
Offline
|
|
actually, either is acceptable. \<newline> is a line continuation in bash:
Originally Posted by bash man page
A non-quoted backslash (\) is the escape character. It preserves the literal value of the next character that follows, with the exception of <newline>. If a \<newline> pair appears, and the backslash is not itself quoted, the \<newline> is treated as a line continuation (that is, it is removed from the input stream and effectively ignored).
Thus, one can use \<newline> to put long commands/arguments on multiple lines. e.g.:
is the same as:
So for the OP, if you wanted to input the way you have shown in your post you would enter the command like:
Code:
sudo mv \<return>
/System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj \<return>
/System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj.disabled<return>
(dont type <return>, but rather hit the return key.)
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Sep 2005
Location: Rochester, NY
Status:
Offline
|
|
Since you question had been answered seriously, I can provide the obligatory humor:
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Dec 2001
Location: Land of Enchantment
Status:
Offline
|
|
That is goood
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2005
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2005
Status:
Offline
|
|
This didn't work...Dont I need to create lproj.disabled directory first?
OUTPUT:
kits-mac-mini:~ kit$ sudo mv \
> /System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj\
> /System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj.disabled
usage: mv [-f | -i | -n] [-v] source target
mv [-f | -i | -n] [-v] source ... directory
(
Last edited by pwrmacg4; Nov 25, 2010 at 07:18 PM.
)
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
The backslashes (\) are what is causing the problem here, the feedback you are getting indicates a syntax error in your command.
The backslashes are just needed to allow a command to span multiple lines so that it doesn't have to wrap off of the edges of the screen. They are totally optional, just for visual purposes. SInce they are tripping you up I'd just take them out:
sudo mv /System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj /System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj.disabled
Just paste that into your terminal all into a single line. If you don't get anything in response after entering your password and after pressing return, it worked.
|
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Apr 2001
Location: Wasilla, Alaska
Status:
Offline
|
|
I have no idea why he didn't just copy paste what I provided.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
It's because someone decided to make things more complicated than they needed to be by "correcting" it with the backslashes and all. It's a really bad idea when dealing with people who, unlike many in this forum, don't use the Terminal on a regular basis. KISS.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2005
Status:
Offline
|
|
I cut&pasted. It said "no such file or directory."
(
Last edited by pwrmacg4; Nov 27, 2010 at 01:51 PM.
)
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
How about simplifying it a bit more by splitting it into two commands?
Code:
cd /System/Library/Services/AppleSpell.service/Contents/Resources
sudo mv en_GB.lproj en_GB.lproj.disabled
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status:
Offline
|
|
Originally Posted by pwrmacg4
This didn't work...Dont I need to create lproj.disabled directory first?
OUTPUT:
kits-mac-mini:~ kit$ sudo mv \
> /System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj\
> /System/Library/Services/AppleSpell.service/Contents/Resources/en_GB.lproj.disabled
usage: mv [-f | -i | -n] [-v] source target
mv [-f | -i | -n] [-v] source ... directory
That didn’t work because there’s no space between the source and target filenames, so the system sees only one, very looooong filename (where it expects to see two). The problem with using backslashes is it’s easy to mess up the whitespace. In this case, it’s missing a space before the second backslash. Another common problem is spaces between the backslash and the <cr>.
As Charles says, better to avoid backslashes unless you are experienced in the shell. However, it is often a good idea to start a long line with a backslash <cr>, as then the shell will wrap the line nicely in the terminal (something it doesn’t do if a long line occurs on the same line as the prompt).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|