Is there any way to 'include' another file within the /etc/hosts file? Particularly I want to include a non-protected (-rw-rw-rw) file so I can easily edit it in something like TextMate without having to issue sudo vi /etc/hosts

I'm on OS X, but as far as I know, this should be relevant in other *nix OSs.

link|improve this question
2  
Wouldn't this be a security risk if it were even possible? – DWilliams Apr 8 '10 at 19:36
Probably, but I thought it was worth asking. – lawnmowerlatte Apr 8 '10 at 19:39
feedback

1 Answer

up vote 3 down vote accepted

I do not believe there is any way to include other files into a hosts file.

Would it be possible to make /etc/hosts group-writable by a group that only includes you (and any other users who need to edit it)?

link|improve this answer
Definitely solved my problem. Thanks! – lawnmowerlatte Apr 8 '10 at 19:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.