Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
host config file edit
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="XJ-linux" data-source="post: 1342145" data-attributes="member: 33722"><p>From the Terminal window, you can use the copy, remove and move commands to manipulate files.</p><p></p><p>Try:</p><p>cd /private/etc</p><p></p><p>Then:</p><p>cp -p hostconfig~ hostconfig~.original</p><p></p><p>Then:</p><p>cp -p hostconfig~ hostconfig</p><p></p><p>This will leave you a copy of the original file hostconfig~ called hostconfig~.original, and a copy of that file named just hostconfig. Since you apparently need a hostconfig file without the "~" this might just work (assuming the contents of hostconfig~ are usable).</p><p></p><p>If you find issues with the "new" hostconfig file, just remove it:</p><p></p><p>rm hostconfig</p><p></p><p>This will leave only the hostconfig~ and hostconfig~.original files.</p><p></p><p>You may be told you don't have permission to do any of this. If so, you can use the sudo command and your admin password to do these things:</p><p></p><p>Example:</p><p></p><p>MacGyver:etc username$ cp -p hostconfig hostconfig.original</p><p>cp: hostconfig.original: Permission denied</p><p>MacGyver:etc username$ sudo cp -p hostconfig hostconfig.original</p><p>Password:</p><p>MacGyver:etc username$ ls | grep hostconfig</p><p>hostconfig</p><p>hostconfig.original</p><p></p><p>If you want to be quick about the whole thing, just make a .original copy of hostsconfig~ and then move the original to the new name:</p><p></p><p>cp -p hostconfig~ hostconfig~.original</p><p></p><p>mv hostconfig~ hostconfig</p></blockquote><p></p>
[QUOTE="XJ-linux, post: 1342145, member: 33722"] From the Terminal window, you can use the copy, remove and move commands to manipulate files. Try: cd /private/etc Then: cp -p hostconfig~ hostconfig~.original Then: cp -p hostconfig~ hostconfig This will leave you a copy of the original file hostconfig~ called hostconfig~.original, and a copy of that file named just hostconfig. Since you apparently need a hostconfig file without the "~" this might just work (assuming the contents of hostconfig~ are usable). If you find issues with the "new" hostconfig file, just remove it: rm hostconfig This will leave only the hostconfig~ and hostconfig~.original files. You may be told you don't have permission to do any of this. If so, you can use the sudo command and your admin password to do these things: Example: MacGyver:etc username$ cp -p hostconfig hostconfig.original cp: hostconfig.original: Permission denied MacGyver:etc username$ sudo cp -p hostconfig hostconfig.original Password: MacGyver:etc username$ ls | grep hostconfig hostconfig hostconfig.original If you want to be quick about the whole thing, just make a .original copy of hostsconfig~ and then move the original to the new name: cp -p hostconfig~ hostconfig~.original mv hostconfig~ hostconfig [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
host config file edit
Top