Sponsored Content
Operating Systems OS X (Apple) Trying to enable "web sharing" from terminal Post 302533761 by [MA]Flying_Meat on Friday 24th of June 2011 02:51:16 PM
Old 06-24-2011
man -k sharing
InternetSharing(8) - simple NAT/router configuration daemon
threads::shared(3pm) - Perl extension for sharing data structures between threads

man InternetSharing

man defaults


It appears the com.apple.nat.plist is not created until internet sharing is turned on, so you might want to turn it on through the GUI and examine the resulting plist file.

defaults read /Library/Preferences/SystemConfiguration/com.apple.nat

Note that the defaults command reads plist files, but fails if you specify the plist file extension ".plist"
Leave the file extension off when accessing a plist file with the defaults command.

Good luck. Smilie

There may be a simpler way, so examine the other SystemConfiguration/ plist files after enabling the internet sharing feature...
This User Gave Thanks to [MA]Flying_Meat For This Post:
 

8 More Discussions You Might Find Interesting

1. Programming

what difference between "terminal" and "console"

1 . Thank you for reading the post first. 2 . what difference between "terminal" and "console" (1 Reply)
Discussion started by: chenhao_no1
1 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Shell Programming and Scripting

How to enable "banner" for a user in solaris?

Password: Using keyboard-interactive authentication. Do you agree with the banner terms (y/n)?: y (4 Replies)
Discussion started by: frintocf
4 Replies

5. Shell Programming and Scripting

Checking running process status using "grep" on multiple servers in load sharing system.

Suppose i have 3 different servers say x,y and z. Im running some process say ABC and 40 instances for the same is being created. In load sharing suppose on server x, 20 instances are running server y, 10 instances are running server z, 10 instances are running. While checking the... (1 Reply)
Discussion started by: ankitknit
1 Replies

6. OS X (Apple)

"Locate" Shows Files but Not "LS" in Terminal

OS-X 10.8.4 Using locate I get these results: 10:~ mize$ locate /Users/mize/*.sh /Users/mize/Zend/workspaces/DefaultWorkspace/SLM/vendor/ZF2/bin/check-cs.sh /Users/mize/copy_ascii_upload.sh /Users/mize/copy_ascii_upload_to_server.sh /Users/mize/copy_form_functions_php_to_jpl.sh... (7 Replies)
Discussion started by: Gary Mize
7 Replies

7. AIX

How to enable "TCP MD5 Signatures" and "https" on AIX?

I have searched many times but nothing found. Somebody help please :(:(:( (1 Reply)
Discussion started by: bobochacha29
1 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
PLISTBUDDY(8)						    BSD System Manager's Manual 					     PLISTBUDDY(8)

NAME
PlistBuddy -- read and write values to plists SYNOPSIS
PlistBuddy [-cxh] file.plist DESCRIPTION
The PlistBuddy command is used to read and modify values inside of a plist. Unless specified by the -c switch, PlistBuddy runs in interactive mode. The following commands are used to manipulate plist data: Help Prints this information. Exit Exits the program. Changes are not saved to the file. Save Saves the current changes to the file. Revert Reloads the last saved version of the file. Clear type Clears out all existing entries, and creates root of type type. See below for a list of types. Print [entry] Prints value of entry. If an entry is not specified, prints entire file. See below for an explanation of how entry works. Set entry value Sets the value at entry to value. Add entry type [value] Adds entry with type type and optional value value. See below for a list of types. Copy entrySrc entryDst Copies the entrySrc property to entryDst. Delete entry Deletes entry from the plist. Merge file [entry] Adds the contents of plist file to entry. Import entry file Creates or sets entry to the contents of file. Entries consist of property key names delimited by colons. Array items are specified by a zero-based integer index. Examples: :CFBundleShortVersionString :CFBundleDocumentTypes:2:CFBundleTypeExtensions Entries may be of the following types: string array dict bool real integer date data OPTIONS
-c command Execute command and exit. By default, PlistBuddy will run in interactive mode. -x Output will be in the form of an xml plist where appropriate. -h Print the complete help info. EXAMPLES
Set the CFBundleIdentifier property to com.apple.plistbuddy: Set :CFBundleIdentifier com.apple.plistbuddy Add the CFBundleGetInfoString property to the plist: Add :CFBundleGetInfoString string "App version 1.0.1" Add a new item of type dict to the CFBundleDocumentTypes array: Add :CFBundleDocumentTypes: dict Add the new item to the beginning of the array: Add :CFBundleDocumentTypes:0 dict Delete the FIRST item in the array: Delete :CFBundleDocumentTypes:0 dict Delete the ENTIRE CFBundleDocumentTypes array: Delete :CFBundleDocumentTypes EXIT STATUS
PlistBuddy command returns a zero exit status if it succeeds. Non zero is returned in case of failure. Mac OS X February 19, 2007 Mac OS X
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy