Sponsored Content
Operating Systems OS X (Apple) Detect active usb device used by app Post 303037959 by Neo on Monday 19th of August 2019 11:27:10 PM
Old 08-20-2019
You can get this information with the macOS command:

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

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can't detect usb thumbdrive anymore

hey everyone! i have a Solaris 8 box with me, and i had been using my usb thrumbdrive on it all the time. one day, i was in a rush and i pulled out the thumbdrive without ejecting it or anything. and now i can't detect any thumbdrives at all. i had tried using another thumbdrive, but with no... (2 Replies)
Discussion started by: feef
2 Replies

2. Windows & DOS: Issues & Discussions

How to detect if a Windows app dies??

Hello All: I hope this is the right category... I have a application (this app runs under java and jboss) that runs under Windows, it's started as a service. If that application should become disabled, crash or no longer function, what would be the best method for determining it is no longer... (6 Replies)
Discussion started by: jimmyc
6 Replies

3. Linux

mounting usb device

Hi Folks, I want to know how to mount usb device (cd,dvd etc) in linux, Regards, Manoj (4 Replies)
Discussion started by: manoj.solaris
4 Replies

4. Solaris

Usb Device

AM TRYING TO CONNECT A USB EXTERNAL DRIVE FOR BACKUP,THE USB SLOT IS AVAILABLE,BUT I DONT KNOW IF IT IS READY WHEN I CONNECT IT,AND WHAT COMMANDS DO I NEED. tHANKS (10 Replies)
Discussion started by: tomjones
10 Replies

5. Programming

How to detect usb storage arrival and its mount path from C

Hi, I am a newbi to linux, i wana to write a program in C that can detect arrival of a usb flash memory. I want also to find the actual mount point of new inserted flash disk. can anyone help me? thanks a lot (6 Replies)
Discussion started by: aghashahi
6 Replies

6. Shell Programming and Scripting

BASH Script to Detect and List USB Flash Drives

Hello. This is my first post to this forum. I've read many of the posts over the last two or three years and I've learned a lot. I'm creating a live Linux distribution using the Linux Live Scripts -- just as a hobby project -- and I'm wanting to create an automated way for a user to copy the... (7 Replies)
Discussion started by: godzillarama
7 Replies

7. Shell Programming and Scripting

Detect USB keyboard and other peripherals

Hi there, I have a Debian machine without any peripherals (no screen, no keyboard, etc.). I'd like to be able to detect and log when someone plugs a USB keyboard. Something like : 2009-07-04 12:21 warning: keyboard pluged! Is that possible? I see two ways : 1. Either actively react to the... (4 Replies)
Discussion started by: chebarbudo
4 Replies

8. Shell Programming and Scripting

script to detect a file from inserted usb and puts into a Variable

There is a same named log file that I have on my 2 different android phones. When I plug it into my computer, it appears in the media folder, For example the first android phone: /media/F6BA-0AF5/folder/A.log I want to put that into a variable to be manipulated.... (3 Replies)
Discussion started by: tobenguyen
3 Replies

9. UNIX for Advanced & Expert Users

USB Device Identification

In linux system when a pnp usb device is plugged in then how does the system gets a notification of it? I mean to say in linux usb system there is usb host controller above which is host controller driver above which is usb core. So does the host controller/usb core keeps on polling the usb bus... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

10. UNIX for Advanced & Expert Users

Tar on usb device

Hi, i am developing an application on an ARM 7 architatcure with a small Linux. i want to run tar on a usb device (~10 Mb) but it runs realy slow. the command only takes 1% of cpu usage. is there a way to improve the tar command or is the USB-Connection the bottleneck here? (4 Replies)
Discussion started by: louisk
4 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 11:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy