Sponsored Content
Operating Systems OS X (Apple) How can I direct messages from mac console.app to a log file? Post 303038453 by Neo on Tuesday 3rd of September 2019 12:04:55 PM
Old 09-03-2019
Like your question before, you can (or should be able to) get this information more easily from the system profiler (than using log files):

Code:
system_profiler

See summary man page here:

https://www.unix.com/man-page/mojave/8/system_profiler/


Code:
root#  system_profiler -usage
Usage: system_profiler [-listDataTypes]
       system_profiler [-xml] [-timeout n] [-detailLevel n]
       system_profiler [-xml] [-timeout n] [dataType1 ... dataTypeN]

  -detailLevel n    specifies the level of detail for the report
                      mini = short report (contains no identifying or personal information)
                      basic = basic hardware and network information
                      full = all available information

  -listDataTypes    lists all the available datatypes

  -xml              generates xml output instead of plain text
                    if redirected to a file with the extension ".spx"
                    the file can be opened in System Profiler.app

  -timeout          specifies the maximum time to spend gathering information
                    the default is 180 seconds, 0 means no timeout

  Redirect stderr to /dev/null to suppress progress and error messages.

Examples:

  system_profiler
     Generates a text report with the standard detail level.

  system_profiler -detailLevel mini
     Generates a short report without identifying/personal information.

  system_profiler -listDataTypes
     Shows a list of the available data types.

  system_profiler SPSoftwareDataType SPNetworkDataType
     Generates a text report containing only software and network data.

  system_profiler -xml >MySystem.spx
     Creates a XML file which can be opened by System Profiler.app

This User Gave Thanks to Neo For This Post:
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Re-direct the error msg to log file

Hi All, I have an expression as follows:- a=`expr ${i} + ${j}` >> $log_file 2>&1 Here, if any of the values i or j or both happens to be empty then the "expr" returns error as "expr: 0402-050 Syntax error." My problem is I am not able to re-direct this error to the log file. Its is getting... (4 Replies)
Discussion started by: rony_daniel
4 Replies

2. Shell Programming and Scripting

Direct the output of a script to a log file

Hi, I have a script to compare 2 files. file1=$1 file2=$2 num_of_records_file1=`awk ' END { print NR } ' $file1` num_of_records_file2=`awk ' END { print NR } ' $file2` i=1 while do sed -n "$i"p $file1 > file1_temp sed -n "$i"p $file2 > file2_temp diff file1_temp... (5 Replies)
Discussion started by: autosys_nm
5 Replies

3. Shell Programming and Scripting

Set default app for file type on Mac

Hi there, We have 2 apps on our customers machines that can both open files with the same file extension. Is there any way via shell commands to set which application should be the default? Essentially, I'm hoping to replicate Get Info > Open With > Change All using a shell script, but I just... (0 Replies)
Discussion started by: davewg
0 Replies

4. Shell Programming and Scripting

Need Mac .sh to run command line app in seperate terminal

Hello, currently we are executing a .sh from terminal. The current .sh looks like this: #!/usr/bin/env bash /Users/user/my.app/Contents/MacOS/my & -- Now, we also need to run a third line in the .sh - It's a command line application that I need to run when I execute the above .sh... (0 Replies)
Discussion started by: yoyoyo777
0 Replies

5. UNIX for Dummies Questions & Answers

re-direct to log file

#!/bin/ksh -x cd /tmp/tj ftp -n servername.com << DONE user username password as put test.log quit close DONE echo "testing..." sh -x scriptname, and it shows all, but username, as, put, quit, close, DONE. how can i see those ? (1 Reply)
Discussion started by: tjmannonline
1 Replies

6. Shell Programming and Scripting

Manipulating sed Direct Input to Direct Output

Hi guys, been scratching round the forums and my mountain of resources. Maybe I havn't read deep enough My question is not how sed edits a stream and outputs it to a file, rather something like this below: I have a .txt with some text in it :rolleyes: abc:123:xyz 123:abc:987... (7 Replies)
Discussion started by: the0nion
7 Replies

7. Cybersecurity

Best practice to allow 3rd party app to read messages file.

What is the best practice to allow a 3rd party health monitoring app to read the messages file. Since messages is a system file and is owned by root the app cannot read the file. I don't want to run the app as root so how should I allow the app to read the file. The read function is actually built... (2 Replies)
Discussion started by: slwiley
2 Replies
mxmldoc(1)							   Michael Sweet							mxmldoc(1)

NAME
mxmldoc - mini-xml documentation generator SYNOPSIS
mxmldoc --no-output [ filename.xml ] source file(s) ] mxmldoc [ --footer footerfile ] [ --header headerfile ] [ --intro introfile ] [ --section section ] [ --title title ] [ filename.xml ] [ source file(s) ] > filename.html mxmldoc --docset directory.docset [ --docversion version ] [ --feedname name ] [ --feedurl url ] [ --footer footerfile ] [ --header header- file ] [ --intro introfile ] [ --section section ] [ --title title ] [ filename.xml ] [ source file(s) ] mxmldoc --tokens path [ filename.xml ] [ source file(s) ] > tokens.xml mxmldoc --framed basename [ --footer footerfile ] [ --header headerfile ] [ --intro introfile ] [ --section section ] [ --title title ] [ filename.xml ] [ source file(s) ] mxmldoc [ --footer footerfile ] [ --header headerfile ] [ --intro introfile ] --man manpage [ --section section ] [ --title title ] [ file- name.xml ] [ source file(s) ] > filename.man DESCRIPTION
mxmldoc scans the specified C and C++ source files to produce an XML representation of globally accessible classes, constants, enumera- tions, functions, structures, typedefs, unions, and variables - the XML file is updated as necessary. By default, a HTML representation of the XML file is written to the standard output. Use the --no-output option to disable the HTML output. Man page source can be generated using the --man option. If no source files are specified then the current XML file is converted to the standard output. In general, any C or C++ source code is handled by mxmldoc, however it was specifically written to handle code with documentation that is formatted according to the CUPS Developer Guide which is available at "http://www.cups.org/documentation.php". OPTIONS
--docset directory.docset Creates an Xcode documentation set in the specified directory. --docversion version Specifies the version number for the Xcode documentation set. --feedname name Specifies the Xcode documentation set feed name, typically the project or company name. --feedurl url Specifies the Xcode documentation set feed URL which must point to an ATOM file linking to updates. --footer footerfile Inserts the specified file at the bottom of the output documentation. --framed basename Creates HTML documentation using frames - one for the table-of-contents and one for the body. --header headerfile Inserts the specified file at the top of the output documentation. --intro introfile Inserts the specified file before the table of contents. --man manpage Generated a man page instead of HTML documentation. --no-output Disables generation of documentation on the standard output. --section section Sets the section/keywords in the output documentation. --title title Sets the title of the output documentation. --tokens Generates a Tokens.xml file for use with the Xcode documentation tools. SEE ALSO
mxml(3), Mini-XML Programmers Manual, http://www.minixml.org/ COPYRIGHT
Copyright 2003-2009 by Michael Sweet. 4 May 2009 Mini-XML mxmldoc(1)
All times are GMT -4. The time now is 08:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy