|
|
However, if you wish to determine the version of an application
from a command line interface (CLI), aka a shell prompt, which
you can get using the Terminal application found
in Applications/Utilities you can use the command
system_profiler SPApplicationsDataType
. If you pipe the
output of the command to the more
command you can page
through the list that is output by hitting the space bar when the colon
(:
) prompt is displayed.
$ system_profiler SPApplicationsDataType | more Applications: Microsoft Lync: Version: 14.2.1 Last Modified: 10/2/15 8:52 PM Kind: Intel 64-Bit (Intel): No App Store: No Get Info String: 14.2.1 (150923), © 2010 Microsoft Corporation. All rights reserved. Location: /Applications/Microsoft Lync.app Junos Pulse: Version: 5.0 Last Modified: 4/17/14 4:27 PM Kind: Intel 64-Bit (Intel): No App Store: No Location: /Applications/Junos Pulse.app Microsoft Database Utility: Version: 13.1.6 :
If you are interested in the version of a particular program, such as Safari,
you can use the grep
utility to search for the application name
followed by a colon and then after grep display the two lines that appear after
it finds a match. E.g.:
$ system_profiler SPApplicationsDataType | grep -A 2 "Safari:" Safari: Version: 6.2.8
If you just want to see the version number as output, you can pipe the
output of the above command to the cut
utility, instructing
it to display the string that starts in column 16 of the line that
contains "Version" as shown below. The -c 16-
parameter
instructs cut to display characters from column 16 to the end of the
line.
$ system_profiler SPApplicationsDataType | grep -A 2 "Safari:" | grep "Version:" | cut -c 16- 6.2.8 $ system_profiler SPApplicationsDataType | grep -A 2 "Junos Pulse:" | grep "Version:" | cut -c 16- 5.0
select user from mysql.db where db='dbname';
where dbname is the name of the relevant database. E.g., if I want to
view access to the Abc database, I can use the command below while logged into
the MySQL/MariaDB DBMS as
root (you can log in using the MySQL/MariaDB root account with mysql
-u root -p
):
MariaDB [(none)]> select user from mysql.db where db='Abc'; Empty set (0.00 sec) MariaDB [(none)]>
In the above example, no accounts have been granted access to the database. If I want to grant all types of access to the abcsales1 account to all tables in the database, I can use the command shown below:
MariaDB [(none)]> GRANT ALL on Abc.* to 'abcsales1'@'localhost'; Query OK, 0 rows affected (0.04 sec) MariaDB [(none)]> select user from mysql.db where db='Abc'; +-----------+ | user | +-----------+ | abcsales1 | +-----------+ 1 row in set (0.00 sec) MariaDB [(none)]>
Bear in mind that the select user from mysql.db
where db='dbname';
will only show users who have
database-level access to the database named dbname. It is possible that
an account can have access at the table, column, or proc level rather being
granted access at the database level. To check for those access levels of
access as well as database-level acess, use all of the commands below
substituting the name of the database for dbname:
SELECT user,host FROM mysql.db WHERE db='dbname'; SELECT user,host FROM mysql.tables_priv WHERE db='dbname'; SELECT user,host FROM mysql.columns_priv WHERE db='dbname'; SELECT user,host FROM mysql.procs_priv WHERE db='dbname';
E.g.:
MariaDB [(none)]> SELECT user,host FROM mysql.db WHERE db='Abc'; +-----------+-----------+ | user | host | +-----------+-----------+ | abcsales1 | localhost | +-----------+-----------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT user,host FROM mysql.tables_priv WHERE db='Abc'; Empty set (0.00 sec) MariaDB [(none)]> SELECT user,host FROM mysql.columns_priv WHERE db='Abc'; Empty set (0.00 sec) MariaDB [(none)]> SELECT user,host FROM mysql.procs_priv WHERE db='Abc'; Empty set (0.00 sec) MariaDB [(none)]>
References:
[ More Info ]
top -o cpu
and the
Activity Monitor to check which process was causing the problem,
I found that the Symantec SymDaemon process was the culprit. After I killed
that process, performance improved considerably, the fan noise subsided and
when I compared the CPU temperature before and after stopping the process
with osx-cpu-temp, I found the CPU was
considerably cooler afterwards. Likewise, when I checked the fan speed
with smcFanControl before and
aftwards, I found that smcFanControl showed the fans to be running
considerably slower after the process was stopped.
[ More Info ]
netsh wlan show networks
command at a
command prompt.
C:\users\jane>netsh wlan show networks Interface name : Wireless Network Connection 5 There are 3 networks currently visible. SSID 1 : ARRIS-0142 Network type : Infrastructure Authentication : WPA2-Personal Encryption : CCMP SSID 2 : BY7VQ Network type : Infrastructure Authentication : WPA2-Personal Encryption : CCMP SSID 3 : 30F5A9 Network type : Infrastructure Authentication : WPA2-Personal Encryption : CCMP
You can view the signal strength for a wireless connection from the
system using netsh wlan show interfaces
.
C:\users\jane>netsh wlan show interfaces There is 1 interface on the system: Name : Wireless Network Connection 5 Description : TP-LINK 450Mbps Wireless N Adapter GUID : 55a96587-9163-4f0a-a2c0-2f16705bea60 Physical address : c4:e9:84:15:d6:e4 State : connected SSID : ARRIS-0142 BSSID : 94:87:7c:03:01:40 Network type : Infrastructure Radio type : 802.11n Authentication : WPA2-Personal Cipher : CCMP Connection mode : Auto Connect Channel : 11 Receive rate (Mbps) : 216.7 Transmit rate (Mbps) : 216.7 Signal : 32% Profile : ARRIS-0142 Hosted network status : Not started
For the above Wi-Fi connection, the signal strength is fair at best with a strength of only 32%.
[ More Info ]
[ More Info ]
ftype
command.c:\>ftype /? Displays or modifies file types used in file extension associations FTYPE [fileType[=[openCommandString]]] fileType Specifies the file type to examine or change openCommandString Specifies the open command to use when launching files of this type. Type FTYPE without parameters to display the current file types that have open command strings defined. FTYPE is invoked with just a file type, it displays the current open command string for that file type. Specify nothing for the open command string and the FTYPE command will delete the open command string for the file type. Within an open command string %0 or %1 are substituted with the file name being launched through the assocation. %* gets all the parameters and %2 gets the 1st parameter, %3 the second, etc. %~n gets all the remaining parameters starting with the nth parameter, where n may be between 2 and 9, inclusive. For example: ASSOC .pl=PerlScript FTYPE PerlScript=perl.exe %1 %* would allow you to invoke a Perl script as follows: script.pl 1 2 3 If you want to eliminate the need to type the extensions, then do the following: set PATHEXT=.pl;%PATHEXT% and the script could be invoked as follows: script 1 2 3
If you open a command prompt window and type ftype
with no
options, you will see all the file associations for the system on which the
command is run, i.e., which applications will open particular
file formats. You can
pipe the output of the command into the more
command to page through the information using the space bar or
redirect the output to a file with ftype > somefile.txt
.
c:\>ftype | more Access=C:\Program Files\Microsoft Office 15\Root\Office15\protocolhandler.exe "% 1" Access.ACCDAExtension.15=C:\Program Files\Microsoft Office 15\Root\Office15\MSAC CESS.EXE /NOSTARTUP "%1" Access.ACCDCFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS .EXE" /NOSTARTUP "%1" Access.ACCDEFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS .EXE" /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9 Access.ACCDRFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS .EXE" /RUNTIME "%1" %2 %3 %4 %5 %6 %7 %8 %9 Access.ACCDTFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS .EXE" /NOSTARTUP "%1" Access.ADEFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS.E XE" /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9 Access.Application.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCE SS.EXE" /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9 Access.BlankDatabaseTemplate.15="C:\Program Files\Microsoft Office 15\Root\Offic e15\MSACCESS.EXE" /NOSTARTUP /NEWDB "%1" Access.BlankProjectTemplate.15="C:\Program Files\Microsoft Office 15\Root\Office 15\MSACCESS.EXE" /NOSTARTUP /NEWDB "%1" Access.Extension.15=C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS. EXE /NOSTARTUP "%1" Access.MDBFile="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS.EXE" /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9 -- More --
You might think that you could just type ftype ext
, where
txt is a 3-letter extension, e.g., ftype docx
, to
determine what application will open a file with a .docx extension, but that
won't work.
c:\>ftype docx File type 'docx' not found or no open command associated with it. c:\>ftype txt File type 'txt' not found or no open command associated with it.
You will need to know that a .txt file is identified as a "textfile" and
a .docx file, which is an
Office Open XML
file format, is identified as a "docxfile" for that method to work, but you
can use just the 3-letter extension, if you pipe the output of the ftype
command to the find
command as shown below:
c:\>ftype | find "txt" txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1 c:\>ftype | find "docx" docxfile="%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE" "%1"
From the above output, I can see that the Windows Notepad application is the default program for opening text files, i.e., the program that will open any file with a .txt extension if I double-click on the file in the Windows Explorer. And I can see that the Windows Wordpad, aka Write, program will open .docx files by default.
VLC originated as an academic project in 1996. It was rewritten from scractch in 1998 and released under the GNU General Public License (GPL) in 2001 - see the Wikipedia article VLC media player for further details on the development history for the application.
Steps for converting a file from one format to another, e.g., a FLAC audio file to an MP3 audio format are provided here.
ScriptAlias
directive in Apache's http.conf
configuration file and restart the Apache webserver. If you see an
"Internal Server Error" displayed when the script is being called by
Apache on a Unix/Linux system, but the code is correct, then you may
need to assign execute permission to the file so that Apache can run
the script. You also need to be sure the script contains a line at the
beginning of the file that provides the location of Python on the system.
[ More Info ]