Calling OSX gurus /Markus!!!
#1
Scooby Regular
Thread Starter
Calling OSX gurus /Markus!!!
OK, here's a goody (although probably very simple)
Need to access the "host" file in the /etc folder in OSX
So, I've gone into the "Go to folder", and put in /etc.
The folder opens, and I can modfiy the file, but it won't let me save it.
How do I do this?
Obviously it's a hidden directory within OSX (I'm sure there's plenty of others too!), how do I modify?
Guessing it's done within the terminal....
Dan
Need to access the "host" file in the /etc folder in OSX
So, I've gone into the "Go to folder", and put in /etc.
The folder opens, and I can modfiy the file, but it won't let me save it.
How do I do this?
Obviously it's a hidden directory within OSX (I'm sure there's plenty of others too!), how do I modify?
Guessing it's done within the terminal....
Dan
#5
Scooby Regular
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes
on
0 Posts
I'll chime in now I'm awake
Files in /etc/ are usually have the following permissions:
Basically meaning it's read/write to the root user, and read-only for every other user, and it's owned by the user root and the group wheel.
You can use Go To Folder to get into the /etc/ directory and open the file, and depending on what app you're using, you *might* be able to save any changes. TextEdit will probably give an error, but BBEdit should alert you to the fact you don't have permissions and usually asks for your admin name and password, so it can escalate privileges and save the file.
I normally use BBEdit to edit these files as it has an option to show you the "invisible" files/folders, or you can use the command G key combo in the open dialog and navigate to the hidden folders as you would do in the finder.
If that does not work then I'd use the Terminal and issue sudo pico /path/to/file and edit it via pico
Files in /etc/ are usually have the following permissions:
Code:
-rw-r--r-- 1 root wheel 236 23 Sep 2007 hosts
You can use Go To Folder to get into the /etc/ directory and open the file, and depending on what app you're using, you *might* be able to save any changes. TextEdit will probably give an error, but BBEdit should alert you to the fact you don't have permissions and usually asks for your admin name and password, so it can escalate privileges and save the file.
I normally use BBEdit to edit these files as it has an option to show you the "invisible" files/folders, or you can use the command G key combo in the open dialog and navigate to the hidden folders as you would do in the finder.
If that does not work then I'd use the Terminal and issue sudo pico /path/to/file and edit it via pico
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM