If you want to determine the day of the week for a specific date on a Lunux
system, you can provide that date as a parameter to the date
command with --date.
-d, --date=STRING
display time described by STRING, not 'now'
E.g., to determine the day of the week for August 10, 2008, you could
use the following command at a
Bash prompt:
$ date --date=2008-08-10
Sun Aug 10 00:00:00 EDT 2008
If you only want to see the day of the week, e.g., day 7, "Sun", or "Sunday",
then you can provide a format parameter as well as shown below:
$ date '+%u' --date=2008-08-10
7
$ date '+%a' --date=2008-08-10
Sun
$ date '+%A' --date=2008-08-10
Sunday
The format values used above are as follows:
%a locale's abbreviated weekday name (e.g., Sun)
%A locale's full weekday name (e.g., Sunday)
%u day of week (1..7); 1 is Monday
After attempting to create a system image backup on an external USB
drive of a Windows 7 Ultimate system, I saw a message that "The backup
failed. The system cannot find the file specified. (0x80070002)." The
window where I saw the error message didn't offer me a way to see what
file or files were associated with the error message. It took me many hours
to finally connect the error message to an issue with a USB port on
the front of the computer. When I moved the cable between the external
USB drive and the computer from a USB port on the front of the computer
to one on the back, I was finally able to successfully create a system
image on the external drive.
The Apple Software Update application, which may be found in
C:\Program Files (x86)\Apple Software Update on Microsoft
Windows systems, is used to check for updates for Apple software products
on those systems. While checking for updates, the software establishes
HTTP connections to swcdn.apple.com and swcatalog.apple.com
. You may find that a web server it is querying regarding updates,
though, is in the IP address space of the Internet Service Provider (ISP)
for the system on which the software runs because Apple has partnered with
Akamai
Technologies as have many other large companies, for use of
Akamai's
content
delivery network (CDN) for the delivery of content from Apple. By
partnering with a CDN provider a company can have its content delivered
from servers closer to the end user.
If you wish to set up a Microsoft Windows 7 system as an
File Transfer
Protocol (FTP) server, Microsoft provides FTP server software which you can
enable through the Turn Windows Features on or off capability under
Programs and Features, which you can access from the Control Panel
. You can configure the FTP server service to use "Basic" authentication
so that users will need to provide a user name and password for an account
on the system in order to transfer files to/from the FTP server or you can
choose to set up the FTP server to use anonymous authentication, which will
allow FTP users to type anonymous when prompted for a user name
and then provide whatever they wish when prompted for a password.
Apple's AppleScript
scripting language provides a means to obtain information
from applications on a OS X system. Applications have a
"dictionary" that can be consulted to determine what properties
can be queried or altered. E.g., to see the dictionary for the Mail application on
an OS X system, I can open the AppleScript Editor program found
in Applications/Utilities, then click on File,
select Open Dictionary and scroll down until I see the Mail
application listed. I can then click on it to highlight it and then
click on the Choose button to open that dictionary.
If you need a telnet client
on a Microsoft Windows system, e.g., a Windows Vista, 7, 8, Server 2008
R2, Windows Server 2008 system, etc., you can install
PuTTY, which is probably the
most popular telnet client for Microsoft Windows systems, created by
Simon Tatham, or you
can install one provided by Microsoft from a
command line
interface (CLI), i.e., a command prompt, using the pkgmgr
command as shown below:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>pkgmgr /iu:"TelnetClient"
C:\Users\Administrator>
After you enter the pkgmgr /iu:"TelnetClient" command, you won't
see any indication that the software has been installed. The command prompt
will be redisplayed and you may have to wait a couple of minutes afterwards
for the installation to be completed depending on the speed of your system. If
you see a User
Account Control dialog box displayed when you enter the command, provide
a userid and password for an administrator account and confirm that you want to
allow the action it displays.
After you've installed the telnet client application, you can type
telnet at a command prompt to start the client, which will
take you to the telnet client prompt:
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet>
The telnet client program, telnet.exe is installed in
\windows\system32.
C:\Windows>dir /s telnet.exe
Volume in drive C has no label.
Volume Serial Number is 9420-A68C
Directory of C:\Windows\System32
07/13/2009 08:39 PM 79,872 telnet.exe
1 File(s) 79,872 bytes
Directory of C:\Windows\winsxs\amd64_microsoft-windows-telnet-client_31bf3856ad
364e35_6.1.7600.16385_none_1426830c3ebb712d
07/13/2009 08:39 PM 79,872 telnet.exe
1 File(s) 79,872 bytes
Total Files Listed:
2 File(s) 159,744 bytes
0 Dir(s) 61,068,718,080 bytes free
If you need to change the default application that will be used to open
a particular file type on a Mac OS X system, you can do so by taking
the following steps:
Right-click on a file of that type in the Finder.
Select Get Info.
Click on the triangle to the left of "Open with", then select the
application you wish to use to open files of that kind.
Click on the Change All.. button.
When asked to confirm that you want to change all similar documents to
open with the application click on the Continue button.
A new Star Wars movie,
"The Force Awakens" is being released on Friday December 18, 2015.
The Star Wars ssaga has been told in movies, animated TV series, a comic
book series, novels, games, and
fan fiction. It has
also been related in ASCII art
.
To view the story retold in ASCII art, use a telnet program to connect
to a site in the Netherlands, towel.blinkenlights.nl. You
can do so on an Apple OS X system by opening the Terminal program
found in Applications/Utilities and then issuing the
command telnet towel.blinkenlights.nl. You can issue the same
command from a Linux system. You can stop the display by typing Ctrl-]
and then typing quit at the telnet> prompt. On a
Microsoft Windows system, you can use
PuTTY; set the connection
type to telnet rather than ssh. If you've
ever created ASCII art,
you can appreciate the magntitude of the effort by the following individuals:
Make sure you capitalize those as shown above; if you don't and use
PixelWidth or PixelHeight, i.e., you use an uppercase
"P" rather than a lowercase "p", the result will be "<nil>".
If you only want to see the number, you can pipe the output of the
command to the tail command, instructing that command to
show only the last line of output, and then pipe the output of the tail
command to the cut command, instructing that command to use
the colon as the delimiter for separating items on the line and to show
just the second field, which will be the number preceded by a space:
Or you can omit the tail command and just use
cut by adding the -s argument to that command
to suppress lines with no field delimiter character, i.e., lines with
no colon in this case, assuming there will be none on the first line of
output from the sips command.
If you don't want the space preceding the number, you can use a space character
as the delimiter and specify f4 rather than f2, since
there are two spaces output before "pixel" on the second line of ouput and a
third one after the colon.
If you wished to put that in a window that will be displayed to the user,
you can use AppleScript.
set w to do shell script "sips -g pixelWidth /Users/jdoe/Documents/example.png | cut -d':' -f2 -s"
set h to do shell script "sips -g pixelHeight /Users/jdoe/Documents/example.png | cut -d':' -f2 -s"
display alert "Width:" & (w as text) & "
Height:" & (h as text)
Hit Enter after the double quote at the end of the second-to-last line
to have a newline character appear in the ouput after the line with the width
is displayed so that the height appears on a separate line. The ouput will
be as shown below:
If you want to determine the last time a backup was made on a Microsoft
Windows system using the built-in Windows backup utility, you can do so
from a
command-line interface (CLI), i.e., a
command prompt, using the wbadmin utility.
C:\Users\Administrator>wbadmin /?
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2004 Microsoft Corp.
---- Commands Supported ----
START BACKUP -- Runs a one-time backup.
STOP JOB -- Stops the currently running backup or recovery
operation.
GET VERSIONS -- List details of backups recoverable from a
specified location.
GET ITEMS -- Lists items contained in a backup.
GET STATUS -- Reports the status of the currently running
operation.
Another add-on for Firefox for downloading videos from YouTube pages is
Video
DownloadHelper. The add-on works in Chrome as well and also will allow
you to download videos from other sites as well as the YouTube site. Like
the
Download YouTube Videos as MP4 extension, it allows you to select from
various resolutions for the downloaded video, so you can trade off resolution
against file size, i.e., a higher resolution and larger file size or a lower
resolution and smaller file size.
If you wish to be able to download
YouTube videos to your
own computer, you can use a site, such as
Offliberty or,
for the Firefox web browser, you can install an extension, aka add-on, that
will provide that capability from within the browser. One such add-on for
Firefox is
Download YouTube Videos as MP4 by
ialc.
The extension places a download button on
YouTube pages allowing you
to easily download the video on the page as an MP4 or FLV file. If you select
MP4 as the format for the downloaded file, you can choose from two resolutions:
720p or 360p.
If you have a Mac OS X system, there is a built-in dictionary application that
you can use by moving the mouse pointer over a word and then hitting the
control-command-D keys simultaneously. When you do so the word will
be highlighted in yellow and, if the word is in the dictionary, its
meaning will be displayed as well as thesaurus information for the word.
If the word isn't in the dictionary, you will see "No results found"
displayed.
So, if you encounter a word on a webpage that you don't recognize,
you can go to dictionary.com to
look up the definition of the word or you can stay on the page and look it
up by hitting those three keys simultaneously.
If you use the vi
or Vim text
editors and wish to have lines automatically wrap to the next line
when you get close to the margin, i.e., the 80th column, rather
than having to hit the Return key, you can use the
wrapmargin parameter, e.g., wrapmargin=10.
To enter the command, while not in input mode type :wrapmargin=
followed by the number you wish to use for the wrap margin.
The wrapmargin parameter is set to an integer number of characters. When set to
any nonzero number, vi will watch the lines that you type in the input modes.
When you get to within the "wraprmargin" number of characters of the 80th
character on the line, the next space character that you type will cause vi to
enter a carriage return for you. This parameter gives vi a word wrap
feature for entering text data. When set to zero, the wrap margin feature
is disabled.
If you wish to have vi display the current line and column number as
you type, use :set ruler. If it is turned on you will see the
current line number and column number displayed at the bottom of the vi window,
e.g., 24,67 if you were on line 24 at column 67. The numbers
will change as you move the cursor whether you are in input mode or
not. You can turn it off with :set noruler.
Alternatively, you can also use control-G on a Mac OS X system or
Ctrl-G on a Linux system or with Vim on a Microsoft Windows
system, i.e., hit the control, or Ctrl, and G keys
simultaneously to see the current line and column numbers. You
will see something like the following displayed at the bottom of
the window:
"temp.txt" [Modified] line 30 of 34 --88%-- col 32
In the above example, while editing the file temp.txt the cursor
was on line 30 of the 34 lines in the file and was at column 32 when I
hit control-G. Since 30 is 88% of 34, the cursor was at a point 88
percent of the way through the file. Each time you hit control-G,
the status information will be displayed for the current line and column
when you hit the key combination.
With vi on a Mac OS X or Linux system, you can also use
!}fmt when not in input mode, to automatically wrap the text in
a paragraph so that a line doesn't exceed column 80 in that paragraph from the
point where you enter that command.
On a Mac OS X system, you can check on the status of a wifi connection using
the wifi icon at the top of
the screen. If you wish to check the status of a wifi connection from
the command line, you can use the networksetup utility provided
with the operating system. The command has a lot of options suitable for
viewing the status of a wifi connection and managing wireless connectivity.
You can view the available wireless networks, switch from one wireless network
to another, power the wireless connection on and off, etc. using options
supported by the command.
I use my personal cell phone for work purposes as well, since I don't want
to carry two cell phones. I have the phone's number registered with the
U.S. government's National
Do Not Call Registry. Unfortunately, though, that has not stopped all
telemarketers from calling. Since I can't know the phone number for everyone
who may call me for work-related purposes, I can't choose to ignore incoming
calls based on whether I recognize the incoming number and often
telemarketers
spoof calling numbers, so that, for instance, if you have a phone number
that is 555-555-5555, the telemarketer will spoof the number from which calls
are being placed so that you see a similar number as the calling number, e.g.,
555-555-5566, which may lead those called to assume the caller is someone
local that they may know.
When I'm working I don't want to be interrupted by telemarketing calls,
requests for donations, political spiels, etc. So I registered for a
Google Voice number, which provides me with another phone number that I
can provide to businesses or other entities that I believe may possibly
sell my phone number to others or call me when I don't want interruptions
because I'm working on something I need to focus on. Through the Google
Voice webpage, I can configure the settings for the phone number provided
by Google to automatically forward calls and text messages to the Google Voice
number to my mobile number or stop the forwarding of calls and texts to the
mobile number. When calls/texts aren't forwarded, callers can leave voice
messages, which you can listen to through the Google Voice webpage or
from email in your inbox. You can also view text messages the same way.
E.g., I wanted to check on refinancing my mortgage through LendingTree
which required I provide a phone number at the website. I didn't want to
provide my mobile number for fear I might start receiving a large number
of calls when I'm trying to work. I don't want to turn off the phone, at
such times which would mean I might miss work-related or calls or texts
from family members. And I can't be certain that my phone number won't be
sold to many telemarketers increasing the number of annoying telemarketing
calls I receive. So I provided the Google Voice number. If at some point
in the future I find I'm receiving a large number of unwanted calls to
that number, I can just delete that number from my Google Account.
The process for obtaining a Google Voice number, which is free, is
fairly simple.
I changed my password for a MacBook Pro laptop running OS X 10.8.5. After
I did so, since the password is also used for
802.1X authentication
for a work wireless network, that authentication was failing. I would
see "Authenticating" for a long time and then, eventually, a message
indicating that the system couldn't join the relevent wireless
network because "A connection timeout occurred." I was never prompted
to provide a new password for authenticaion. I was able to fix
the problem, by opening the Keychain Access utility found
in Applications/Utilities then selecting Passwords
from the Category list in the left pane of the Keychain
Access window. In the right pane, I saw several entries for the
wireless network identified as "802.1X Password" for Kind in the
"login" Keychain. All but the top one had "WPA:" at the beginning
of the Name. I selected the top one, though, because the Date
Modified field for it contained "Today" whereas all of the other
entries had a date value of Aug 14, 2013. When I double-clicked on the
top entry with the modification date of today, another window opened
with Name, Kind, Account, Where,
and Comments fields under the Attributes tab. There
was also a check box for "Show password". When I checked that box, a
window opened stating "Keychain Access wants to use your confidential
information..." requesting the "login" keychain pasword. I provided
that password and clicked on the Allow button. I was then
able to view the current 802.11X password and change the password for the
802.11x authentication to the wireless network. After clicking on Save
Changes. I was then able to successfully complete the 802.1X
authentiction seeing an "Authenticated via PEAP (MSCHAPv2) message in
the System PreferencesNetwork window.
If you want to know which version of an application is installed on a
Mac OS X system you can do so from within the GUI using the About option. E.g.,
in the Safari web browser you can click on Safari and select
About Safari. You can also determine the version of applications
installed on an OS X system by clicking on the Apple icon in the
upper, left-hand corner of the screen then selecting About This
Mac, then More Info, then System Report, then
Software, and then clicking on Applications beneath
Software as shown at
Determining the version of the
OS and applications under OS X.
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.
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.:
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.
If you wish to know which accounts have access to a
MySQL or
MariaDB database, you can
use the command 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)]>
Icns files are used on
Mac OS X systems
to store icons for applications. The icns files end with a .icns
extension. An icns file can store multiple icons within itself. The Apple Icon
Image format used for the files supports icons of 16 × 16, 32
× 32, 48 × 48, 128 × 128, 256 × 256, 512 ×
512, and 1024 × 1024 pixels in size. OS X can scale the fixed-size
icons to be displayed at any intermediate size. You can view the icons
stored within a .icns file on an OS X system using the Preview
program found in the Applications directory.
The performance of a MacBook Pro laptop running OS X 10.8.5, aka "Mountain
Lion", that I've been using was very poor today and the fan was making much
more noise than usual. When I used 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.
To view the available WiFi
networks from a Microsoft Windows system from a command line interface
(CLI), enter the 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%.
If you have an image on your computer or find one online and want to know
locations where that image appears on web sites, you can use the
TinEye site or
Google Images. Both sites allow you
to upload an image or provide a
URL for an online location for an image. The services will then
return a list of all the locations where the image or similar images were
found.
On Friday the Juniper Networks Junos Pulse client software I use to connect to a
work VPN stopped working
on my MacBook Pro running OS X 10.8.5, aka
"Mountain Lion".
After the problem first occurred, whenever I started the Junos Pulse program
which is at version 5.0.3, I would see a window with no connections
listed whereas previously I would see the work VPN connection with
a Connect button to the right of it. When I tried adding the prior
VPN connection again, I would receive a "Failed to connect to the Juniper
Unified Network Service" error message. Today was the first day I had
to spend any significant amount of time troubleshooting the problem. I
was able to resolve the problem using commands that had worked previously
with another Junos Pulse VPN client problem.
If you wish to know what application will open a particular file type on
a Microsoft Windows system, you can obtain that information from the command
line using the 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.
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:
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.
The free
and open-source (FOSS)
VLC program can be used to convert audio and video files from one format
to another. VLC is a cross-platform, audio/video (A/V) program that is
available for Microsoft Windows, Mac OS X, Android, and iOS systems.
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.
If you attempt to run a Python script on a web page on an Apache web server
and see only the Python code displayed, then you may need to create a
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.
The driverquery command can be used on Microsoft Windows systems to obtain
information on the
device drivers in use on the system. You can use driverquery /si
to determine which drivers on the system have been digitally
signed and the /v option to obtain detailed, i.e., verbose,
output for the drivers on the system. You can use the command
wmic loadorder to obtain information on the load order for
the drivers.
Iperf is a tool that can
be used to determine the network bandwidth available between two end points.
On one system you run iperf in server mode and on the other you run it in
client mode. On both hosts iperf will report the available bandwidth. E.g.,
below is the output from a system running iperf in server mode:
[root@localhost install]# [ 4] local 192.168.18.44 port 5001 connected with 172.25.2.72 port 55990
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.4 sec 3.00 MBytes 2.42 Mbits/sec
To install Iperf on a CentOS system with yum install iperf,
you may need to configure the system to use the Extra Packages for Enterprise
Linux (EPEL) repository, which you can do by issuing the command
yum install epel-release. A repository is a source for software
packages that can be installed with yum.
To download a webpage with a
Python script, you can use the following, substituting the URL for the
page you wish to download for the one for which you wish to download the
source code:
If you wish the script to prompt for the URL and a location for a file
where the source code for the web page will be stored, you can use the
following:
The "w" in the f=open(outfile, 'w') line indicates the file
should be opened for writing. Other possible modes for the file are listed
below:
Modes
Description
r
Opens a file for reading only. The file pointer is placed at the beginning of the file. This is the default mode.
rb
Opens a file for reading only in binary format. The file pointer is placed at the beginning of the file. This is the default mode.
r+
Opens a file for both reading and writing. The file pointer placed
at the beginning of the file.
rb+
Opens a file for both reading and writing in binary format. The file
pointer placed at the beginning of the file.
w
Opens a file for writing only. Overwrites the file if the file
exists. If the file does not exist, creates a new file for writing.
wb
Opens a file for writing only in binary format. Overwrites the file
if the file exists. If the file does not exist, creates a new file for
writing.
w+
Opens a file for both writing and reading. Overwrites the existing
file if the file exists. If the file does not exist, creates a new file
for reading and writing.
wb+
Opens a file for both writing and reading in binary
format. Overwrites the existing file if the file exists. If the file
does not exist, creates a new file for reading and writing.
a
Opens a file for appending. The file pointer is at the end of the
file if the file exists. That is, the file is in the append mode. If
the file does not exist, it creates a new file for writing.
ab
Opens a file for appending in binary format. The file pointer is at
the end of the file if the file exists. That is, the file is in the append
mode. If the file does not exist, it creates a new file for writing.
a+
Opens a file for both appending and reading. The file pointer is at
the end of the file if the file exists. The file opens in the append
mode. If the file does not exist, it creates a new file for reading
and writing.
ab+
Opens a file for both appending and reading in binary format. The
file pointer is at the end of the file if the file exists. The file
opens in the append mode. If the file does not exist, it creates a new
file for reading and writing.
If you named the script
download_webpage.py, you could run it from a command line inteface,
aka shell prompt, as follows:
To mirror what is displayed on a laptop's screen to an external monitor under
Apple's OS X operating system, take the following steps after connecting the
external monitor:
Click on the Apple icon on the upper, left-hand of the screen and select
System Preferences.
Under Hardware, click on Displays.
Click on the Arrangement tab for the display and check the check box
next to Mirror Displays.
You should then see a copy of the information displayed on the laptop's builtin
monitor also displayed on the external monitor.
If you want to synchronize files stored on a computer with the Google Drive
cloud from the command line, the only way to do so currently using the
application provided by Google appears to be to kill the
googledrivesync.exe process that handles the synchronization
and then restart it. You can kill the processes - there are actually two
of them running with the same "googledrivesync.exe" name - from the command line
with taskkill /f /fi "imagename eq googledrivesync.exe" and
then restart them with the command
"C:\Program Files (x86)\Google\Drive\googledrivesync, assuming
that the googledrivesync application is stored in the
default location of "C:\Program Files (x86)\Google\Drive\.
For a field in an Access 2013 database that I wanted to hold the amperage
for a device's power adapter, e.g., 1.5, I specified the field should
be a number with a "fixed" format. But whenever I put in 1.5, Access would
change it to 2. I clicked on the button to increase the number of
decimal points, but Access would round the number 1.5 to 2.0 then.
To resolve the problem, I clicked on View for the table and
selected Design View.
I could then see, when I selected the field that was to hold the amperage,
that the Field Size value was set to Long Integer. An
integer field, obviously, won't hold a fractional part for the number.
I set the value to Single instead by clicking in the
field and selecting that option from the dropdown list, so I could store
a floating point value in the field rather than an integer.
From the dropdown list for field size, you can select the following
values:
Setting
Description
Decimal precision
Storage size
Byte
Stores numbers from 0 to 255 (no fractions).
None
1 byte
Decimal
Stores numbers from -10^38-1 through 10^38-1 (.adp)
Stores numbers from -10^28-1 through 10^28-1 (.mdb, .accdb)
28
2 bytes
Integer
Stores numbers from -32,768 to 32,767 (no fractions).
None
2 bytes
Long Integer
(Default) Stores numbers from -2,147,483,648 to 2,147,483,647 (no
fractions).
None
4 bytes
Single
Stores numbers from -3.402823E38 to -1.401298E&45
for negative values and from
1.401298E-45 to 3.402823E38 for positive values.
7
4 bytes
Double
Stores numbers from -1.79769313486231E308 to
-4.94065645841247E-324
for negative values and from 4.94065645841247E-324 to
1.79769313486231E308 for positive values.
15
8 bytes
Replication ID
Globally unique identifier (GUID)
N/A
16 bytes
Note: you can see the values that each one can hold by hitting
the F1 key to get online help on the topic after clicking
on the value stored in the Field Size field while in
Design View.
When I switched back to Datasheet View by clicking on
View and then selecting Datasheet View, I was then
able to change the value from 2.0 to 1.5 and have it remain as 1.5, i.e.,
Access had stopped rounding numbers to the nearest integer for the field.
If you wish to obtain the model number and serial number for a hard disk drive
(HDD) from the command line on a Microsoft Windows system, you can use
the
Windows Management Instrumentation command line tool wmic at a
command prompt or get-wmiobject -class win32_diskdrive from a
Windows PowerShell
prompt.
For wmic, you can use the following command:
C:\Users\JDoe\Documents>wmic diskdrive get caption, model, serialnumber
Caption Model SerialNumber
TOSHIBA MQ01ABD075 TOSHIBA MQ01ABD075 73RISBDFS
Seagate Backup+ Desk USB Device Seagate Backup+ Desk USB Device NA5J4H3R
In the above example, I also included the caption
parameter to get a description for the drive that may help me more
easily identify it, though in this case the caption information and the
model information are the same. In the above case, the Toshiba drive
is the internal drive in the system while the Seagate is an external,
USB-attached drive.
To use PowerShell to obtain the same information, I could use the
command below:
You can obtain much more information on drives in PowerShell with the
get-wmiobject -class win32_diskdrive | format-list * command.
If the drive supports
Self-Monitoring, Analysis
and Reporting Technology (SMART), you can use the status
command to learn if the drive may be failing or is encountering problems that
could lead to a drive failue.
PS C:\Users\Jim> get-wmiobject -class win32_diskdrive | format-table Caption, Model, Status, SerialNumber
Caption Model Status SerialNumber
------- ----- ------ ------------
TOSHIBA MQ01ABD075 TOSHIBA MQ01ABD075 Pred Fail 73RISBDFS
Seagate Backup+ Desk USB D... Seagate Backup+ Desk USB D... OK NA5J4H3R
The Toshiba drive has a status of Pred Fail, which indicates
a SMART-enabled hard disk may be functioning correctly, but a failure is
predicted soon. You can also retrieve the status of a drive using
the wmic command.
C:\Users\JDoe\Documents>wmic diskdrive get model, status, serialnumber
Model SerialNumber Status
TOSHIBA MQ01ABD075 73RISBDFS Pred Fail
Seagate Backup+ Desk USB Device NA5J4H3R OK
Other parameters you can use with wmic to obtain drive information, such
as the capacity of the drive, etc., are listed at
Using wmic to get disk drive
information.
A PowerShell command that can be used to determine which drive
the operating system considers to be drive zero, drive one, etc. is shown
below:
My wife told me that MediaMonkey (MM) on her PC was taking a long time to start
playing songs; it could take 20 seconds to begin playing a song after
she double-clicked on it from the Windows Explorer to play the song. She
showed the problem to me by having Windows 8 use Media Monkey as the default
player for MP3 files. When she clicked on a song, I observed it did take as
long as she reported, but when she then switched the default player to
Windows Media Player, songs started playing almost immediately when she
double-clicked on them. I checked the version of MediaMonkey on her system
and found it was 4.1.7.1741. When I checked the MediaMonkey website at
MediaMonkey >> Download,
I found the current version is 4.1.9.1764. After I downloaded and installed
that version, the problem no longer occurred.
The open source K-Meleon
web browser has its own macro language which can be used to extend the
capabilities of the browser. Macros are stored in K-Meleon Macro Module (KMM)
files, which can be placed in the macros directory beneath
the direcory where you installed K-Meleon to make them available to all users
of the browser on a system; K-Meleon runs on Microsoft Windows systems.
When I attempted to install
ACDSee Video Converter Pro 4.1 on my wife's computer, I received
the mesage "Error opening file for writing" referencing the file
CheckWinVer.exe.
The problem was due to the fact that I hadn't right-clicked on the
installation file and chosen "Run as administrator". When I aborted the
installation and started over running it as administrator, the program
installed successfully.
If you wish to clear the Windows Media Player (WMP) library, but not delete
the music from your system, within the program while viewing your music,
hit Ctrl-A to select all entries then right-click and select
Delete. When a window opens prompting you as to whether you wish
to delete items only from your library or wish to also delete the music
files, e.g., MP3 files, from your system, leave "Delete from library only"
selected and click on OK.
In
MediaMonkey,
to clear the database, you can click on File then select Clear
Database. You will then be prompted to type "YES" to ensure that
you didn't inadvertently select to remove all entries from the Media
Monkey music library for your account. For a family member who wanted
to reinitialize her library, though, I found that after typing "YES"
in all capital letters to proceed that a blue circling ring appeared
for awhile, but afterwards all of the entries remained visible in the
proram. If I clicked on File and selected Close or clicked
on the "X" at the upper, right-hand corner of the Media Monkey window,
the program would not close. When I closed the program through the
Windows Task Manager, reopening it showed all the entries remained.
Perhaps, because she had such an extensive music collection, the
program may have been taking a long time to clear the database, but
the library was never cleared after we performed several attempts
to clear it. But there is another way to clear the database and
start fresh. You can, instead, delete the Media Monkey database
file, MM.DB. After killing the program through the Task
Manager, I deleted that file, which, on a Windows 8 system is found at
C:\Users\username\AppData\Roaming\MediaMonkey\MM.DB
where username is the username for the account. Note: you may
have to turn on the display of hidden files, folders, and drives through
the Windows Explorer in order to view that location. I also deleted
MM.DB-journal, which is found at that location. Then,
when she reopened Media Monkey, the library was empty and she was able
to add the music she wanted in the library back into it.
To control the sound volume on a Microsoft Windows system, e.g., Windows 7
or 8, you can run the sndvol command from a command prompt.
If you issue the command with no options, it will open the Volume Mixer
that will allow you to adjust the audio volume.
You can view just the master volume slider if you use the -f
option, i.e., sndvol -f.
The Mail application found on Mac OS X systems supports the
transmission and decoding of encrypted email that uses public key
unfrastructure (PKI) certificates. You will see an open padlock icon on
messages that will be sent unencrypted. If you have a public certificate
for a recipient, you can click on the button with that symbol on it to
encrypt the message.
OS X also provides the command line security utility for managing
certificates. You can use security find-certificate email_address where email_address is the email address to which you wish to
send email to determine if you already have a public certificate for the
recipient in your keychain.
If you are using PKI software from Entrust on the system, you can also
use it to retrieve public certificates for recipients.
You can create a clickable button on a web page with
Cascading Style Sheets (CSS)
as explained in Creating a
button with CSS or simply use the
HTML
button tag, i.e.
<button>label_for_button</button>. You can apply a style attribute
to the button to change the background color on the button, display
attributes for the text, such as bold, etc. and can specify an action that will
be taken if someone clicks on the button. The button tag has been part
of HTML since version 4.0.
The freeware/shareware
IrfanView program for systems running the Microsoft Windows operating
system provides the capability to convert images from one
image file format
to another by using its "save as" feature. If you have an image, e.g., a
JPEG/JPG image, that you wish
to convert to a transparent GIF
format, you can do so by the following steps:
Open the original image file, e.g., the JPG file.
If you need to do any image cleanup, you can edit the image by clicking
on Edit and selecting "Show Paint dialog"; a small window will then
open with image editing tools that you can use, e.g., if you need to change
any stray pixels to the color you wish to use as the transparent color. You
can choose View and Zoom In, if you need to zoom into the
image for a closer inspection.
Then, to save as a transparent gif, click on File and select
Save as.
For "Save as type", choose GIF - Compuserve GIF.
In the JPEG/GIF save options window, choose "Save transparent color"
from the GIF section. You will then have three options: "use main window color
for transparency", "choose transparent color during saving", or "set
transparency value to palette entry". If you choose "choose transparent
color during saving" when you save the file, you will be able to click
on an area in the image that contains the color you wish to use as the
transparent color.
Click on Save to save the image in the new format. Note: you need
to click on the Save button on the Save Picture As window,
not the Save button on the JPEG/GIF save options window. A
Choose transparent color window will then open. Click somewhere
on the image where the color exists that you wish to be the transparent color.
As with many other browsers, if you leave the Safari web browser open for
an extended period of time with many tabs open, you may find that the
overall system performance on a Mac OS X system decreases dramatically
and you may have to suffer with the "spinning beachball" when trying to
do even simple tasks, such as scrolling down a web page. The problem may
be due to Safari consuming a lot of CPU cycles or most of the available
memory. With some browsers, such as Firefox, where I've frequently
encountered peformance issues if it is left running for a couple of days
with many tabs open, it is difficult to determine which tab may be the
culprit. With a browser such as Chrome, where tabs are run as separate
processes, it is much easier. With Safari, you can use Debug
menu options to obtain per tab memory and CPU utilization information
by viewing the consumption of those resources by processes associated with
those individual tabs.
I wanted to locate messages from any sender at a particular domain name
in the mailbox for an account on a Linux system. The server where the acount
resides uses sendmail and dovecot for email and the mailbox file for the
account was in mbox format.
When email is stored in mbox format, all email messages in the inbox
are stored in the same text file. The beginning of each email message
is indicated by a line whose first five characters consist of "From"
followed by a space (the so named "From_ line" or "'From ' line" or simply
"From line") followed by the sender's e-mail address.
In this case, the mailbox was huge with tens of
thousands of messages in a file 24 GB in size and I wanted
to extract just a few pertinent messages. So I created find-email.py,
which can be run in either "brief" or "full" mode by changing the value
of a variable named brief in the script. In brief mode, the
script will just print the "from" line for any message where a sender's
email address matches the specified address followed by the subject of
the message and then the date the message was sent. When all messages
in the file have been processed, it will print the number of matching
messages found. In "full" mode, the script will print the entire email
message whenever a match is found.
While working on a system that had the Norton 360 software installed
for antivirus protection, I wanted to ensure that I could query the
system using the Simple Network
Management Protocol (SNMP), but when I tried to check the Norton
360 firewall settings, I found the option to do so was grayed out. I
had thought that I could check and modify the settings, if needed, by
right-clicing on Norton 360 and choosing "Run as administrator", but I
found that didn't work. In order to check the firewall settings I had
to log into an administrator account rather than a regular user account.
On a Microsoft Windows system, files and directories have three time stamps
associated with them: the creation time for the file or directory, the time
it was last modified, and the time it was last accessed. If you wish to
change any of those time stamps, you can use a utility such as the free
NirCmd utility
provided by Nir Sofer at NirSoft.
E.g., you can change the date/time of the specified filename (creation
time and modified time) using a command such as the one below:
Nir also provides
FolderTimeUpdate, which "scans all files and folders under the base
folder you choose, and updates the 'Modified Time' of every folder
according the latest modified time of the files stored in it. This tool
might be useful if, for example, you backup a cluster of folders and
then restore them into another disk, but the backup program doesn't
restore the original modified time of the folders."
You can also use
Windows PowerShell, which Microsoft has made available for Windows XP and
later versions of its operating system to change those time stamps using
a command similar to the following ones where name is the file
or directory name for which you wish to change the time stamp:
I wanted to boot a Dell Inspiron 14 5000 series laptop (model number 14-5447)
from a USB flash drive to perform an image backup of the internal hard disk
drive (HDD). I had placed the Clonezilla backup program on a USB flash drive -
see Creating a Clonezilla
bootable flash drive - and wished to use it to create an image backup
of the system's hard disk drive before upgrading the system from Windows 8.1
to Windows 10. But, in order to boot from the USB flash drive, I needed to
change the Universal Extensible
Firmware Interface (UEFI) settings to allow me to boot the system from the
external USB flash drive. The steps to modify the system settings are listed
at Entering UEFI from a Windows 8
system. Though these steps were written for this specific system, a similar
process can be followed on other systems.
If you are searching for SSH server software for a Microsoft Windows
system, there are a number of products to choose from, including ones
that are free. Some commercial products are also free for personal use.
Some of the choices include the following:
The Safari web browser from Apple doesn't by default provide a menu option
that will allow you to view the underlying HTML code on a web page. But
the browser does provide that capability, you merely need to enable the
"Show Develop menu in menu bar" option.
Safari does provide a capability to change the user agent string it sends
to websites, which sites use to identify the browser a visitor is using.
Some sites may even limit access to material on the site to specific browsers.
By changing the user agent the browser reports, you may be able to still view
the content in such cases.
After you've installed the PRTG
network monitoring software on a Microsoft Windows system, which provides
Simple Network Management Protocol (SNMP) monitoring capabilities, when you
log into the web interface for the first time, the login name and password for
the default administrator login are both prtgadmin. You can leave the login name
and password fields empty and click on the Default Login button
to log in using these default credentials.
If you changed the password, but have forgotten the password, you can
reset it by running the PRTG Administration Tool. Once you've opened the
application, click on the Administrator tab then type a new password
in the Password field and retype the password in the Confirm Password
field. If you've also forgotten the login name you used, you will
see it on that window.
When you click on Save & Close, you will see the following
message:
In order to activate the settings the following will be done by the
PRTG Administration Tool:
- Stop and start the PRTG core server service.
The PRTG Administration Tool will close automatically afterwards.
OK to proceed?
If you are accessing the web interfce through a browser and provide
the login credentials but don't see any message indicating that they are
incorrect, but just see the page for entering the userid and password
again, then you may need to enable cookies in the browser; I had to
enable cookies in the
K-Meleon browser to get past the login screen.
If you changed the port for the web interface, you can find it listed under
the Web Server tab.
Note: these instructions apply to PRTG Administration Tool version
V15.3.17.2995 and might not apply to other versions.
If you need to update the value for a column in a
MySQL or
MariaDB table, two
relational database management systems named after the daughters, My and
Maria, of the lead developer for the projects,
Michael Widenius,
where there is a space in the column name, use the
backtick
, aka, bakckquote, character, i.e., `, to enclose the name of
the column. E.g., to update an entry in a table named "Sales" in a
database named "packages", if the field was named "Work Phone", I could
use the following:
MariaDB [(none)]> use personnel;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [personnel]> UPDATE Sales SET `Work Phone` = '555.555.5555' WHERE LName = 'Smith';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [personnel]>
You can also use the command below to update the entry without first
selecting the database with the Use command.
UPDATE `personnel.`Sales` SET `Work Phone` = '555.555.5555' WHERE `Sales`.`LName` = 'Smith';
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| ann |
| crystal |
| grover |
| horticulture |
| justiceleague |
| maker |
| mars |
| moon |
| orwell |
+--------------------+
10 rows in set (0.09 sec)
MariaDB [(none)]>
You can see the tables within a particular database by selecing the database
with use dbname, where dbname is the name of the
database, and then using show tables;.
You can view details on the columns in a particular table by using
DESCRIBE tablename where tablename is the
name of the table.
MariaDB [crystal]> DESCRIBE smf_smileys;
+--------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+----------------------+------+-----+---------+----------------+
| id_smiley | smallint(5) unsigned | NO | PRI | NULL | auto_increment |
| code | varchar(30) | NO | | | |
| filename | varchar(48) | NO | | | |
| description | varchar(80) | NO | | | |
| smiley_row | tinyint(4) unsigned | NO | | 0 | |
| smiley_order | smallint(5) unsigned | NO | | 0 | |
| hidden | tinyint(4) unsigned | NO | | 0 | |
+--------------+----------------------+------+-----+---------+----------------+
7 rows in set (0.05 sec)
MariaDB [crystaltokyo]>
You can also use EXPLAIN tablename, since EXPLAIN
and DESCRIBE are synonyms, but the DESCRIBE keyword is
more often used to view information about a table's structure, whereas EXPLAIN
is more often used to obtain a query execution plan, i.e., an explanation of
how MySQL would execute a query.
The Stop
Spammer mod can be used on a Simple
Machines Forum (SMF) site in conjuction with the
httpBL mod to deny spammers
access to a forum. The package uses the
Stop Forum Spam site's database of spammers, which tracks IP addreses,
email addresses and usernames used by forum spammers.
To use the package, you need to obtain an API key from the
Stop Forum Spam site; you will provide that key at the settings page for
the mod once you have installed the package. You can view your keys at the
Stop Forum Spam API Keys page.
When you install the package, you can choose to install it for some or all
of the themes installed on the site. During the installation, the following
three files will be installed in the images/icons/ directory for
the themes that you choose during the Stop Spammer mod installation:
moreinfo.gif
spammer.gif
suspect.gif
E.g., if I chose to install the mod for the
"Blue
Moonlight" theme, the following would appear during the installation
process:
Tonight I finally had time to locate and fix the cause of a viewlog error
message I had been seeing when attempting to view the httBL logs for a
Simple Machines Forum (SMF) site.
The problem was caused by the httpBL.template.php file in the
Themes/default directory being empty, i.e., a zero byte file.
When I replaced it with the file by that name from the zip file I downloaded
to use for the httpBL installation, the problem disappeared.
When I put in the HTTPS URL for a website in Safari, I saw the message below:
Safari can't verify the identity of the website "example.com".
The certificate for this website is invalid. You might be connecting to a
website that is pretending to be "example.com", which could put your
confidential information at risk. Would you like to connect to the website
anyway?
[ Show Certificate ] [ Cancel ] [ Continue ]
When I clicked on Show Certificate, I saw "This certificate has
an invalid ussuer.
Since this was a trusted work site, I downloaded a
.p7b file containing the
issuer certificate. I then opened the Keychain Access app,
which is in Applications/Utilities, then clicked on File,
then Import Items, then selected the .p7b file I downloaded.
I then no longer saw the certificate warning message in Safari. I
didn't have to restart Safari to have it recognize the website's
certifcate as valid.
I encountered several problems while installing the package. The first one
was when I attempted to install it for all themes on the site. I had installed
18 additional themes for the site. The install process indicated an issue with
only one of the themes, the
Excellent Love theme. An install test failed for that theme. When I
investigated the cause of the problem I found it was due to a file in the
theme having line endings appropriate for a text file on a Mac OS X system,
but I was installing it on a Linux system. I resolved that problem by converting
the line endings, i.e, the "newlines", in the file to the appropriate one for
a Linux system as explained in
Test failed for Excellent
Love theme for httpBL install.
After resolving the problem with the theme, I encountered another problem
installing the software. I saw a
Database Error
message stating that the log_httpBL table didn't exist for
the forum, which took me a long time to track down and fix.
Then once I had the software installed and the mod's page indicated
it was working ok, when I attempted to view the httpBL logs by going
to the Administration Center then selecting Members, then
MOD httpBL, and then selecting one of the logs, or from the MOD
httBL page when I selected Spammers Log, Humans Log, or Errors Log,
I saw the following error message:
An Error Has Occurred!
Unable to load the 'viewlog' template.
Checking for where the error mesage might be found, I saw the following:
$ grep -rwl "Unable to load" --include=*.php
Sources/Load.php
Themes/default/languages/index.english.php
The error message is coming from
Themes/default/languages/index.english.php. In that file, I see
the following:
$txt['theme_template_error'] = 'Unable to load the \'%1$s\' template.';
When I checked to see where theme_template_error occurred, I
found the following:
Since the httpBL mod logs contain information on IP addresses retrieved
from the Project Honey Pot dabase, perhaps because the site is unavailable the
logs can not be displayed at the moment.
Update: when the Project Honey Pot site became available again I still
experienced the problem viewing the httpBL logs. I finally traced the cause
of the problem to a zero
byte httpBL.template.php file. Replacing that file fixed the problem.
After setting up a Simple Machines Forum
(SMF) site, I found a
spammer registered from a Ukrainian IP address before I even registered
the administrator account for the forum. I changed the forum configuration
so that new members must be approved by the administrator and then installed
themes for the
forum. When I had completed installing themes, I noticed an attempt to
register on the forum by five other spammers.
ID
username
Email Address
IP Address
5
boersmaizc
solanonicole120@gmail.com
193.201.224.158
6
gjssknua
ehdazusmm@gmail.com
46.151.52.63
7
KennethFERM
sepetriw@yandex.com
193.201.224.171
3
vsrvrzune
ybficpefo@gmail.com
46.151.52.35
4
yadiragoldieu1a
andarytsq@outlook.com
142.54.185.122
When I searched the Stop Forum
Spam site, I didn't find the username boersmaizc listed, but
I did find the email address listed with many entries from the IP address
193.201.224.158 listed. The IP address is assigned to OpaTelecom in
Ukraine. There were many
instances of the solarnicole email address being used by the spammer from
the 193.201.224.158 address, but also instances of that email address being
associated with IP addresses in Argentina (190.221.23.158), China
(119.253.252.22, 112.20.190.20, 117.185.124.73, 115.28.39.12, 120.198.245.36,
117.177.243.43, and 122.89.138.111), Finland (109.70.176.1),
France (212.129.21.28), Hong Kong (182.239.127.140), Kahzakhstan
(82.200.245.107), Russia (78.25.98.250), Thailand (203.190.251.116), and
the United States (209.66.200.64) -
PDF.
The IP address in France was marked as "Toxic IP address or "bad" email domain".
There was another Ukrainian IP address in the list, 193.201.224.171, in the
same block of IP addresses,
193.201.224.0 - 193.201.227.255.
Another Ukrainian IP address on the list was 46.151.52.63. A search
at the Réseaux IP Européens
website revealed that IP address was assigned to PE Radashevsky Sergiy
Oleksandrovich (ISP ReedLan). RIPE is the
regional
internet registry for Europe, Russia, the Middle East, and Central Asia.
Another Ukrainian IP address, 46.151.52.35, from the same
46.151.48.0 - 46.151.55.255 block of addresses was in the list.
The remaining IP address was 142.54.185.122, which the
American Registry for Internet Numbers (ARIN), a RIR, linked to Zhou
Pizhong in North Kansas City, Missouri.
A Stop Forum Spam search
showed many entries for that IP address, which it associated with the
United States, for August 22 with many prior entries as well.
All of the entries were awaiting membership approval; I deleted all of them.
When I did so, I noticed another attempt to register from a
Ukrainian IP address, 46.151.52.37. I deleted that one as well.
I set up a Simple Machines Forum (SMF)
forum today using SMF 2.0.10, the latest supported release of the
software. When I logged into the forum immediately after setting it up
there was already one spam posting, which was a long block of text with
many spam links within it.
When I viewed the member information for the spammer, I saw the following:
In the spam posting, I found a link to the website from "true religion jeans
outlet" along with a lot of other links.
When I checked the spammer's profile information, I saw the following:
Username:
uwzedekzk
Posts:
1 (N/A per day)
Email:
jyhnjknmo@gmail.com
Gender:
Male
Age:
31
Location:
Brazil
Date Registered:
Today at 08:32:47 AM
IP:
46.151.52.64
Hostname:
Local Time:
August 22, 2015, 09:44:49 AM
Last Active:
Today at 08:32:52 AM
The signature the spammer had on his profile was "oakley glasses" which
was a link to http://www.oakley-sunglass.us.org/. The registration time for
the spammer was listed as 8:32:47 AM. When I checked the registration time
for the administrator account I created when setting up the forum, it was
08:34:58 AM, so the spammer posted two minutes prior even to the registration
of the administrator account.
The 2.1 version of SMF allows one to restrict registrations during the
installation process to require admin approval, but that isn't part of the
installation procedure for 2.0 versions. Instead, you need to log into the
forum as an administrator after installing the software and change the
registration option so that members can't register immediately. I did
change the setting immediately after logging in as the administrator to
Admin Approval by clicking on Admin, selecting Features
and Options, then Members , then Registration, then
Settings. The choices for registration are as follows:
Immediate Registration
Email Activation
Admin Approval
Registration Approval
With "Immediate Registration" as the default option when the forum software
is installed, spammers can post spam if you don't act quickly to change the
option. But even though I logged in as the administrator immediately after
completing the installation and changed the option, I was still too late
to prevent this particular spammer from posting spam.
On the profile page for the spammer, I selected Actions
and then Ban this user. I then selected an expiration period
of Never for a full ban for the spammer. For Triggers,
I left "Ban on Email Address (e.g. *@badsite.com)" selected with the
email address he used and also left "Ban on Username" selected with his
username, uwzedekzk. I also selected "Ban on IP (e.g., 192.168.10-20.*)"
selected for his IP address, which was 46.151.52.64. Then from his
profile page, I again selected Actions and then chose "Delete
this account".
When I performed a Stop Forum
Spam site search, I didn't find the spammer's username nor email address
listed, but I found a large number of entries for the IP address for August
22, 2015. The spammer used many usernames where the names were just random
strings of characters and the email addresses likewise used random strings
of characters, but all using "@gmail.com". The Stop Forum Spam
Contry Check - Ukraine
page currently shows "7775469 entries in our database from Ukraine
(20.31 percent of total)", i.e., about 1/5 of forum spam is originating from
Ukrainian spammers. The
Spam sources by country page currently shows that their statistics for
the last year show spam originating from Ukrainian IP address space in 51.7%
of the spam reports (PDF).
Since the spammer uses random email addresses and usernames,
I removed the email check from the SMF spammer check, leaving just
the IP address check by selecting Members and then Ban
list. The Stop Forum Spam site search reported "Found 1000 entries
for "46.151.52.64". I saw a prior incident with a Ukraninian forum spammer
r little over 5 years ago, in July of 2010, when a
Ukrainian spammer
manged to post spam to one of my wife's forums.
If you have a range of cells in an Excel worksheet that contain a date and
you wish to obtain a count of the number of those cells that have a date
that is prior to or equal to today, you could use the formula below, presuming
the relevant cells containing the date are in the range E2:E810:
COUNTIF(E2:E810,"<="&TODAY())
The ampersand concatenates today's date after the <=.
If you wanted a count for only those dates prior to today, but not including
today, you could replace the <= with <.
If you need to count cells based on multiple criteria, you can use
COUNTIFS. E.g., if for the above range of cells I want to
count the number of cells that not only have a date prior to or equal to today,
but only count the cells if there is some value in another cell in
the row, i.e., if the date in column E is prior or equal to today and there is
some value in column P in that row, i.e., column P is not blank, I can use
the formula below:
=COUNTIFS(E2:E810,"<="&TODAY(), P2:P810, "<>"&"")
E.g., I need to track when an expiration date stored in column E for an
item has passed, but I only want to count the entries when I've contacted the
user associated with the item notifying him that he needs to renew the item.
In column P in the worksheet, I store the date I contacted the user. If I
haven't yet contacted the user, the cell is empty.
I also want to now how many expiration notices I sent today, so use the
formula below for that number:
The formula checks the values in column E from E2 to E810 to determine
if the date in those cells is less than or equal to today and, if so,
whether today's date is in the corresponding cell in column P. If both
criteria are met, then the count is incremented by 1.
If you need to obtain information regarding the BIOS in a system running
a Microsoft Windows operating system (OS), you can do so from a command
prompt using the wmic command. E.g. to obtain the BIOS version,
you can use wmic bios get smbiosbiosversion. You can also use
the wmic bios get biosversion command, which may also
show the BIOS date, depending on the BIOS manufacturer. Other commands that
you can run are systeminfo | find "BIOS" and msinfo32.
The latter command will open a window showing BIOS information along with a
plethora of other information.
You may occasionally need to know the name of the database used
for Simple Machines Forum (SMF)
installation, e.g., perhaps while troubleshooting a problem or if you need
to modify an entry in a table or remove all of the tables for the forum with
phpMyAdmin.
To identify the database, in the directory where the forum files are
stored, look for Settings.php . Look for the "Database Info"
section in the file:
In the above example, I can see that the database name is jane_smf
and that the userid for access to the database through
MySQL or
MariaDB is
jane with a password of ASecretPwd. Within the
jane_smf database, the tables for her forum begin with
janeswebsite_. One database could be used for multiple forums
with the tables for each beginning with a specific database prefix.
If you do need to remove all of the tables beginning with a specific
prefix from a database, e.g., in the case where a database is used for
multiple forums, you can use the instructions at
Dropping tables with a
similar prefix from a MySQL database to remove just those for a specific
forum.
Mac OS X systems have a /etc/sshd_config file for configuring
SSH server settings just as one finds on Linux/Unix systems. On a
Linux or Unix system, you can edit that file and change the Port
line to change the listening port for the SSH
daemon
from the standard port of 22 to some other port. On Linux/Unix systems
you will find the following line in the file:
#Port 22
To change the port on which the system listens for SSH connections from
SSH clients, you merely remove the "#" from the beginning of the line,
which signifies the line is a comment, and repace "22" with the new port
you wish to use for SSH connections and then restart the SSH server
service.
You can do the same on an Apple OS X system, but the change will have
no effect on the port the SSH daemon will listen on, which you can verify
using the netstat command, which will still show the
system listening on the standard SSH port.
To change the listening port on an OS X system, you must, instead, edit
/System/Library/LaunchDaemons/ssh.plist. E.g., if you use
the vi text editor, you
can use the following command:
Replace the ssh in the line
<string>ssh</string>
with the new port you wish to use, e.g., 50022. To prevent
confusion later, it is probably best not to use a
well-known port number, i.e., it is probably better to pick a port above
1,023. And you may also want to avoid using a
registered port, since those are ports commonly used by a variety of
applications. Registered ports are those from 1,024 to 49,151.
Once you've replaced "ssh" with a nonstandard port number in
ssh.plist, you need to restart the SSH server service, which
you can do with the following two commands:
You can then verify that the SSH service is listening on the new port
with the netstat command. E.g., if you selected 50,022 for
the new port, you could use the command below:
Note: you can't use the launchctl stop and launchctl
start commands to stop and restart the SSH server service regardless
of whether it is listening on a standard or nonstandard port. You won't
see any error messages, but the commands will have no effect as you can
check by issuing a netstat command after the stop command.
To boot a Dell Dimension from a USB flash drive, for example a Clonezilla
Live USB drive, connect the USB flash drive, power on the system, then hit
F12 to get the boot menu when you see the Dell logo. From the
boot device menu, select "USB Flash Device".
Boot Device Menu
================
1. Normal
2. Hard-Disk Drive C:
3. IDE CD-ROM Device
4. Diskette Drive
5. USB Flash Device
6. System Setup
7. IDE Drive Diagnostics
8. Boot to Utility Partition
Enter a choice: 1
You can configure the system to always attempt to boot from a USB
device before the hard disk drive (HDD) by hitting F2 when
you power on the system and the Dell logo appears to enter the BIOS
setup. Under Hard-Disk Drive Sequence, you can put "USB Device"
at the top of the list, if you wish by using the "+" or "-" keys to
rearrange the order in which the BIOS will choose boot devices. You will
need to put "USB Device" prior to "System BIOS boot devices" to have
the system attempt to boot from a USB drive first. You can select
"USB Device" and use the minus key to move it to be entry 1 in the list.
On a Ubuntu Linux system, you can determine the hard disk drive (HDD) serial
number, disk capacity, and manufacturer with the command sudo lshw
-class disk:
You can obtain information on an optical drive, such as a CD-ROM or DVD
drive using the dmesg command. Piping the output to egrep
allows you to filter out extraneous data.
From the above output, I can see the read and write speed for the CD/RW
drive in the system is 48 speed.
You can also obtain the speed of the drive by examining the contents of
/proc/sys/dev/cdrom/info.
$ cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17
drive name: sr0
drive speed: 48
drive # of slots: 1
Can close tray: 1
Can open tray: 1
Can lock tray: 1
Can change speed: 1
Can select disk: 0
Can read multisession: 1
Can read MCN: 1
Reports media changed: 1
Can play audio: 1
Can write CD-R: 0
Can write CD-RW: 0
Can read DVD: 0
Can write DVD-R: 0
Can write DVD-RAM: 0
Can read MRW: 1
Can write MRW: 1
Can write RAM: 1
$
You can obtain the manufacturer and model number for a CD-ROM, CD/RW, or
DVD drive using the cd-drive utility from the libcdio-utils
package. If it isn't installed, you can install it on an Ubuntu
system with sudo apt-get install libcdio-utils.
$ cd-drive
The program 'cd-drive' is currently not installed. You can install it by typing:
sudo apt-get install libcdio-utils
$ sudo apt-get install libcdio-utils
Once you've installed the package, you can view vendor, model number,
and other information for the drive, including functions the drive supports
by issuing the command cd-drive.
$ cd-drive
cd-drive version 0.83 i686-pc-linux-gnu
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
The driver selected is GNU/Linux
The default device for this driver is /dev/cdrom
Drivers available...
GNU/Linux ioctl and MMC driver
cdrdao (TOC) disk image driver
bin/cuesheet disk image driver
Nero NRG disk image driver
CD-ROM drive supports MMC 3
Drive: /dev/cdrom
Vendor : HL-DT-ST
Model : CD-ROM GCR-8483B
Revision : 1.05
Profile List Feature
Core Feature
ATAPI interface
Morphing Feature
Operational Change Request/Notification not supported
Synchronous GET EVENT/STATUS NOTIFICATION supported
Removable Medium Feature
Tray type loading mechanism
can eject the medium or magazine via the normal START/STOP command
can be locked into the Logical Unit
Random Readable Feature
CD Read Feature
C2 Error pointers are not supported
CD-Text is supported
Initiator- and Device-directed Power Management Feature
Ability to respond to all commands within a specific time Feature
Vendor-specific code ffde Feature
Hardware : CD-ROM or DVD
Can eject : Yes
Can close tray : Yes
Can disable manual eject : Yes
Can select juke-box disc : No
Can set drive speed : No
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device : No
Reading....
Can read Mode 2 Form 1 : Yes
Can read Mode 2 Form 2 : Yes
Can read (S)VCD (i.e. Mode 2 Form 1/2) : Yes
Can read C2 Errors : No
Can read IRSC : Yes
Can read Media Channel Number (or UPC) : Yes
Can play audio : Yes
Can read CD-DA : Yes
Can read CD-R : Yes
Can read CD-RW : Yes
Can read DVD-ROM : No
Writing....
Can write CD-RW : No
Can write DVD-R : No
Can write DVD-RAM : No
Can write DVD-RW : No
Can write DVD+RW : No
$
In the above example, I can see the drive model number is
GCR-8483B, so can look online for futher information that might
be available from the manufacturer, if needed.
Note: all of the above examples were run on a Ubuntu 12.04 LTS system.
I could no longer move the mouse pointer on an eMachines netbook system
running Ubuntu 12.04. I could use Alt-Tab to move between open windows,
but could not move the mouse pointer using the touchpad. Using the
instructions at
Restarting your touchpad/mouse in Ubuntu in simple steps, I used
the Alt-F2 key combination to obtain a "run a command" field. I tried
gksudo modprobe -r psmouse then hit Alt-F2 again and
entered gksudo modprobe psmouse but found no difference. I already
had a terminal window open, so I switched to it with Alt-Tab, though
you can open one by hitting Alt-F2 and entering gnome-terminal
. I entered the command sudo modprobe -r psmouse there
and provided my password when prompted. The screen then went black for a
moment and I appeared to have been logged off. I provided the login password
for my account, hit Alt-F2, typed gnome-terminal,
then typed sudo modprobe psmouse. That restored mouse movement
using the touchpad, though I did see the message "System program problem
detected Do you want to report the problem now?" I chose to
report the problem. That led to another window opening with the message
"Sorry, Ubuntu 12.04 has experienced an internal error. If you notice
further problems, try restarting the computer." When I chose to look at
details, I saw the following:
Executable Path
/usr/bin/Xorg
Package
xserver-xorg-core 2:1:.11.4-0ubuntu10.13
Problem Type
Xorg crashed with SIGABRT in raise()
.tmp.uity.support.test.0
A crash report for the incident was placed in /var/crash.
At that point after submitting the report, I decided to reboot.
I needed to build Apache from an SRPM file, since I needed to change options
for suexec and recompile it. I downloaded the httpd source code, i.e., the
"source
RPM", httpd-2.4.6-19.el7.centos.src.rpm, from the
CentOS
Mirror site. But when I attempted to rebuild Apache, I encountered the
error message "configure: error: APR not found. Please read the documentation."
When I got past that error message I saw the error message
"configure: error: pcre-config for libpcre not found. PCRE is required and
available from http://pcre.org/". I was able to get past those issues,
but the process of recompiling suexec wasn't as quick as I had hoped it would
be.
To obtain information on the disk drives attached to a Mac OS X system,
including the
Self-Monitoring, Analysis
and Reporting Technology (S.M.A.R.T), aka SMART, status of drives. you can
use the diskutil list command, which will show all of the disk
drives attached to the system.
Pams-Computer:~ pam$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *250.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 249.7 GB disk0s2
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *8.0 GB disk1
1: DOS_FAT_32 SI_IMPRESS 8.0 GB disk1s1
Pams-Computer:~ pam$
If you need to determine which IP address on your
LAN are in use and the
media access control (MAC) address associated with them,
Bopup Scanner from
B Labs is a handy free utility that
will quickly scan a range of IP addresses and provide the MAC addresses
for the systems within the specified IP address range. It can also tell
you if any of the systems are functioning as web servers listening on TCP
ports 80 or 8080.
If you need to configure a custom service from the command line interface
(CLI) you obtain by a Secure Shell (SSH) connection to a Juniper NetScreen
Firewall running ScreenOS, you can use the set service
command. E.g., to create a custom service for an SSH server listening on
a non-standard port for SSH, you could use something like the following,
if the server is listening on port 2005:
set service "Auburn SSH" protocol tcp src-port 1024-65535
dst-port 2005-2005
The text in quotation marks immediately after set service
is just a descriptive name you can give to the service to make the purpose
of the custom service more immediately identifiable.
If you have not yet created an address book entry for the system
running the custom service, you can use the set address
command to create it.
Database access for
MariaDB or
MySQL database users can
be controlled through the GRANT, REVOKE and
DROP commands. You can see a list of the users with the
select user from mysql.user; command. If you add host
to that command, e.g., SELECT user, host from mysql.user;,
you can also see the hosts/IP addresses from which users are allowed to
connect to databases.
A hard disk
drive in a computer today will normally be a 3.5 inch or 2.5 inch drive,
which is the size of the platters on which data is stored inside drives.
Read/write heads move over the spinning platters to read and record data.
Laptops will have a 2.5" drive and desktop systems will likely have a 3.5"
drive, though may have a 2.5" drive. Before these sizes became common,
there were 5.25" drives when Parallel ATA (PATA) drives were used. Seagate
released the first 5.25" drive in 1980 and Rodime released the
first 3.5" hard drive in 19831. Before 5.25" inch drives were
used in desktop systems there were 8" drives. You can
find some of the history of hard drive development in the Wikipedia article
History
of hard disk drives and the PCWorld article by Rex Farrance,
Timeline: 50 Years
of Hard Drives.
Hard disk drives have spinning platters within them, much as an old record
player will spin a record, though the platter in a HDD spins much
faster. Today you may find drives that spin at 5,200 revolutions
per minute (RPM) or 7,200 revolutions per minute (RPM). What does
that equate to in miles per hour (MPH)?
If a platter in the HDD is 3.5" in diameter then the
radius is 1/2
that number, i.e. 1.75". A platter in a 2.5" drive has a radius of
1.25". The circumference
of a circle is 2πr, i.e., 2 times the radius times the mathematical
constant pi, which is
approximately 3.14159265. So for a point on the outer edge of a 3.5" drive's
platter that is spinning at 7200 RPM where a point on the outer edge of
the platter travels 2 * π * r inches per revolution, the speed in MPH is
approximately 75 MPH:
You can take a screen shot from a command line interface (CLI)
on a Mac OS X system by using the screencapture command.
The screen capture program is located in /usr/sbin. You can
see the available options by using screencapture -h; the
-h option isn't a valid option for the application, but it
will cause the app to print the options it does accept.
$ which screencapture
/usr/sbin/screencapture
$ screencapture -h
screencapture: illegal option -- h
usage: screencapture [-icMPmwsWxSCUtoa] [files]
-c force screen capture to go to the clipboard
-C capture the cursor as well as the screen. only in non-interactive modes
-d display errors to the user graphically
-i capture screen interactively, by selection or window
control key - causes screen shot to go to clipboard
space key - toggle between mouse selection and
window selection modes
escape key - cancels interactive screen shot
-m only capture the main monitor, undefined if -i is set
-M screen capture output will go to a new Mail message
-o in window capture mode, do not capture the shadow of the window
-P screen capture output will open in Preview
-s only allow mouse selection mode
-S in window capture mode, capture the screen not the window
-t<format> image format to create, default is png (other options include pdf, jpg, tiff and other formats)
-T<seconds> Take the picture after a delay of <seconds>, default is 5
-w only allow window selection mode
-W start interaction in window selection mode
-x do not play sounds
-a do not include windows attached to selected windows
-r do not add dpi meta data to image
-l<windowid> capture this windowsid
-R<x,y,w,h> capture screen rect
files where to save the screen capture, 1 file per screen
$
By default, a screenshot will be stored in PNG format, but you can select
other formats with the -t (lowercase "t") option. You can
specify that you want to use PDF, JPG, or TIFF, instead. You can use the
-T (uppercase "T") option to specify a delay in seconds
between the time the command is issued and the time the screen shot
is taken, which gives you the opportunity to switch to another window
to have a screenshot taken of it. The advantage of screenshot over the
GUI Preview program
found in the Applications folder for taking a picture of a window is
that with Preview sometimes pulldown menus will disappear from a window
when you switch to Preview to take a screen shot. With screencapture,
you can issue the command with a delay, the default is 5 seconds, switch
to the relevant window, select the menu or other option, and then wait
the number of seconds specified for screencapture to capture the contents
appearing in that window at that time. E.g., the command below will wait
10 seconds to take a snapshot of what is appearing on a window that is
the current one when 10 seconds elapses.
$ screencapture -T 10 grayed.png
libpng warning: zero length keyword
libpng warning: Empty language field in iTXt chunk
$
You won't see any indication that the screen capture occurred, so you
need to just wait until the specified time has elapsed before looking for
the output file, which will be placed in the current directory from which you
issued the command if you didn't specify a path, but only the file
name. The "libpng warnings" don't indicate that the screen shot
couldn't be taken; the output file specified is a valild PNG file.
I recently overwrote a file with notes about a problem I had to deal with that
was residing on a web server by moving another file over top of it
accidentally. I was in a hurry to complete my notes so I could go to
bed; I thought about waiting until the morning to complete the notes,
but thoughit I could complete them in just a few more minutes, but when I
used !:1 as a shorthand in a mv command, I didn't realize
that the second item on the last command line entry was the filename for the
file with my notes. I didn't realize what I had done until I tried to
view the web page with my notes from the PC I was using at the time for
the SSH connection to the web server.
Since I had viewed the notes in the Google Chrome browser on the Microsoft
Windows-based system I was on shortly before I overwrote them, I thought
I might be able to find a copy of the notes in the browser's cache. But
since I didn't grasp what I had done until I refreshed the page in the
browser, it was now too late to get the data from the Chrome cache, since the
cached page now just showed the "404 file not found" message due to the
file no longer existing on the web server. So I thought there still
might be a slim chance that I could recover the notes web page from
a Volume Shadow
Copy, i.e., a prior version of the file stored on the Windows
system. I thought, if I could identify the particular cache file used
for that webpage, there might be a prior version of that file
stored by the Volume Shadow Copy Service. I thought I could possibly
use ChromeCacheView,
which is a small, free program that will allow you to
examine the Google Chrome web browser cache. With
that program you can view a list of all cached web pages and
view the cached copies of those pages stored on the system.
I was able to identify the particular file in the
C:\Users\%username%\AppData\Local\Google\Chrome\User
Data\Default\Cache directory that held that particular
cached webpage. The file was data_4, but unfortunately,
I wasn't able to find a prior version of the file. Though if you
need to examine the Chrome cache on a Microsoft Windows system, ChromeCacheView
is a very useful tool well-suited to that purpose. You can also put
chrome://cache in the Chrome addres bar to see a list of
URLs of cached pages, but ChromeCacheView provides many more capabilities
for operations on that list of cached items.
I needed to reset a forgotten administrator password for a
Simple Machines Forum (SMF) forum
running SMF 2.0.10 today. To do so, since
phpMyAdmin was installed
on the server hosting the forum, I used phpMyAdmin to access the database for
the forum and then found the entry in the _members table for the administrator
account. I saw the following fields for the password (actual values not shown):
Column
Type
Function
Null
Value
password
varchar(64)
d2d0b6f8f5e59d26550054b2f08bc7ceb514992b
password_salt
varchar(255)
f284
I replaced the value in the password field with a new password and deleted
the contents of the password_salt field and then clicked on the Go
button to update the record in the table for the administrator account.
After I logged into the forum with the administrator account, I checked
the record in the table in the database for the forum again and found that
there was a new value in the passwd_salt field and the entry in the password
field was re-encrypted and was now a long sequence of digits and characters
again rather than the plain text password I entered
A password
salt is "random data that is used as an additional input to a
one-way
function that hashes a password or passphrase. The primary function of
salts is to defend against
dictionary
attacks versus a list of password hashes and
against pre-computed
rainbow table attacks." By not storing a password in a database in plain
text, even if someone gains unauthorized access to the database, even if they
can then view passwords stored in the database, they can't see the actual
password used for the account associated with the password. If the password
was simply stored in an encrypted form, if the attacker who gained access
to the database had access to a
"rainbow table", i.e.,
a table that matched the plain text version of a password with its encrypted
form, he could deduce the orginal password. But by using a random "salt" value
as part of the encrypted password generation, a rainbow table won't help
the attacker, since even if Sam and Sally both use the same password and the
same encryption function is used to generate the stored password for both of
them, because the random salt value is used as part of the process to obtain
the encrypted version of the password, the value stored in the password for
Sally wil not match that for Sam. So an attacker can't look up an encrypted
entry in a rainbow table and find a match for the unencrypted password used
to create the encrypted version and won't even know that Sam and Sally have
the same password. This helps protect Sam and Sally, even if all of their
data on the site where the database is stored is compromised, since the
malefactor doesn't get a password for them that they might have used on other
sites as well.
After my wife installed the Yahoo Messenger Suite so that she could
chat with a friend using it, on opening the Google Chrome browser, the
Yahoo Search - Web Search page would appear. She didn't want that;
she wanted to have google.com as her home page and to have a tab open to
that when she started the browser as had occurred prior the the installation
of the Yahoo Messenger software. She said she had chosen not to install
the Yahoo toolbar and not to have it make such changes when she installed
the software, so was irked to find her home page was "hijacked" to be
a Yahoo search page. I found that I need to change both her home page and
the start page for Chrome to put her settings back to what they had been
prior to the installtion of the software.
I received a call today from someone who reported that she had started
compressing a QuickBooks file, since she wanted to upload the data to
Intuit's site (QuickBooks 2013 provides a "condense" function that is
accessible from the File menu by choosing Utilities then
Condense data), but during the process of removing old entries from
many years ago the company owner needed her to do some work in QuickBooks
so she terminated the compression operation. As soon as she told me
that I suspected she was calling because by doing so the company file
had been corrupted. That seemed to be the case, because she said she
could no longer find any entries in the file for this year besides those
for today. She thought that the QuickBooks data was being backed up to
an external, USB-attached disk drive on her system, but when I checked
its contents I found that the last backup to that drive had occurred a
couple of years ago.
Fortunately the data was stored on a Microsoft Windows system running a
version of Windows that uses Microsoft's
Volume Snapshot Service
, which allows you to simply right-click on a file or folder name,
choose Properties and then click on the Previous Versions tab
and select from shadow copies of the file or folder that were made
previously, though in this case I didn't even need to do that.
If you want to obtain information on the internal and external drives
attached to a Microsoft windows system from a command line prompt, you
can use the wmic command. To view just the model number
for drives, you can use wmic diskdrive get model.
c:\>wmic diskdrive get Model
Model
ST31000528AS
ST6000DX000-1H217Z
Generic- Multi-Card USB Device
WD My Book 1230 USB Device
c:\>
You can also use wmic diskdrive get Name, Manufacturer, Model
to get the name of the drive in the system and manufacturer, though for
the manufacturer you may just see (Standard disk drives).
Though, if you have a model number, such as ST31000528AS, you
can often deduce the manufacturer without even doing an online search on
the model number. E.g., Seagate starts model numbers with "ST", so I know
that the ST31000528AS and ST6000DX000-1H217Z are Seagate drives. And I
know the "WD" in "WD My Book 1230 USB Device" means the drive is a
Western Digital external disk drive.
You can also obtain the capacity of each drive in bytes by using the
size parameter.
c:\>wmic diskdrive get model, size
Model Size
ST31000528AS 1000202273280
ST6000DX000-1H217Z 6001172513280
Generic- Multi-Card USB Device
WD My Book 1230 USB Device 4000710389760
c:\>
So the ST31000528AS drive is 4000710389760 byte / 1,000 byte/kilobyte
/ 1,000 kilobyte/megabyte / 1,000 megabyte/gigabyte / 1,000 gigabyte/terrabyte
= 4 TB using the 1,000 number used by manufacturers rather than the
1,024 byte/kilobyte, etc. number often used in computing. E.g., see
the Wikipedia article on
Gigabyte.
If you want to see the list of other drive parameters you can check,
use wmic diskdrive get /?.
c:\>wmic diskdrive get /?
Property get operations.
USAGE:
GET [<property list>] [<get switches>]
NOTE: <property list> ::= <property name> | <property name>, <property list>
The following properties are available:
Property Type Operation
======== ==== =========
Availability N/A N/A
BytesPerSector N/A N/A
Capabilities N/A N/A
CapabilityDescriptions N/A N/A
CompressionMethod N/A N/A
ConfigManagerErrorCode N/A N/A
ConfigManagerUserConfig N/A N/A
DefaultBlockSize N/A N/A
Description N/A N/A
DeviceID N/A N/A
ErrorCleared N/A N/A
ErrorDescription N/A N/A
ErrorMethodology N/A N/A
Index N/A N/A
InstallDate N/A N/A
InterfaceType N/A N/A
LastErrorCode N/A N/A
Manufacturer N/A N/A
MaxBlockSize N/A N/A
MaxMediaSize N/A N/A
MediaLoaded N/A N/A
MediaType N/A N/A
MinBlockSize N/A N/A
Model N/A N/A
Name N/A N/A
NeedsCleaning N/A N/A
NumberOfMediaSupported N/A N/A
PNPDeviceID N/A N/A
Partitions N/A N/A
PowerManagementCapabilities N/A N/A
PowerManagementSupported N/A N/A
SCSIBus N/A N/A
SCSILogicalUnit N/A N/A
SCSIPort N/A N/A
SCSITargetId N/A N/A
SectorsPerTrack N/A N/A
Signature N/A N/A
Size N/A N/A
Status N/A N/A
StatusInfo N/A N/A
SystemName N/A N/A
TotalCylinders N/A N/A
TotalHeads N/A N/A
TotalSectors N/A N/A
TotalTracks N/A N/A
TracksPerCylinder N/A N/A
The following GET switches are available:
/VALUE - Return value.
/ALL(default) - Return the data and metadata for the attribute.
/TRANSLATE:<table name> - Translate output via values from <table name>.
/EVERY:<interval> [/REPEAT:<repeat count>] - Returns value every (X interval) se
conds, If /REPEAT specified the command is executed <repeat count> times.
/FORMAT:<format specifier> - Keyword/XSL filename to process the XML results.
NOTE: Order of /TRANSLATE and /FORMAT switches influences the appearance of outp
ut.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be follo
wed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results
will be done.
The hardware requirements Microsoft lists for various versions of its
operating systems has remained the same for processor speed and memory
from Windows Vista through Windows 7, 8, and 8.1. Microsoft recommends
a 1 GHz or faster Central Processing Unit (CPU) and 1 gigabyte (GB) of system
memory. And from Windows 7 through Windows 8.1 the amount of available
hard drive space recommended has been 16 GB available hard disk space for
the 32-bit version or or 20 GB for the 64-bit version.
Someone reported to me recently that she could no longer check her email.
She was using Outlook and kept getting prompted to provide the password,
but when she provided it Outlook wasn't able to check her incoming email
and she would be prompted for the password again.
She told me the password she was using, so I established a telnet connection
to port 110, the
Post Office Protocol version 3 (POP3) port from another system using
PuTTY and entered her userid
and password. The email server, which uses
Dovecot to
provide
IMAP
and POP3 service, acknowledged that was the correct password.
+OK [XCLIENT] Dovecot ready.
user nell
-ERR Unknown command.
user nell
+OK
pass Rugs1234
+OK Logged in.
stat
+OK 52 483564
quit
If you connect to port 110, the pop3 port, you can enter a user
command to provide the userid (I don't know why dovecot always responded
to the first submission of that command with -ERR Unknown command,
when I used PuTTY to connect, but then accepted it on the second
submission) and then a pass command followed by the
password. You can then issue a stat or uidl
command to check on the number of messages in the inbox and their
size. For the stat command, the first number in the response is the
number of messages and the second number is their size in bytes. The
uidl command shows the unique message id for each message. You can
end the session with the quit command.
Since the password seemed to be correct, I had her try again to download
her email while I observed what was happening with
tcpdump on the mail server
by issing the command tcpdump -i enp1s4 'port 110' -A from
the root account. I used i enp1s4, because enp1s4
is the network interface on that particular system. The -A
at the end instructs tcpdump to print each packet (minus its link level
header) in ASCII.
What I observed was her system sending the USER command and her
userid. But then Outlook on her system would send the AUTH
command and the server would reply ".-ERR [AUTH] Plaintext authentication
disallowed on non-secure (SSL/TLS) connections"
When I observed what was happening with the same tcpdump command when
I connected to the server from another system on its LAN by a telnet
connection to port 110, I saw the following:
I.e., the server was accepting a plaintext password, though it wasn't
accepting one from her system. When I entered the AUTH command
from the telnet session to port 110, it was accepted without that error
message.
+OK [XCLIENT] Dovecot ready.
user nell
-ERR Unknown command.
user nell
+OK
AUTH
+OK
PLAIN
.
pass Rugs1234
+OK Logged in.
I then remembered that she had told me
her ISP replaced her network equipment recently. She has an IP that
remains constant unless the router is replaced at her end in which case
the new device has a different
media access control (MAC)
address and will be assigned a different IP address.
I put the new IP address in the /etc/mail/access file,
so that sendmail would allow relaying from that IP address without any
authentication. I.e., I added a line with her IP address followed by
RELAY.
10.45.1.12 RELAY
I then ran the makemap hash command to generate a
new /etc/mail/access.db file.
# makemap hash /etc/mail/access </etc/mail/access
But that only allowed her to send email via sendmail without authentication.
I also had to update dovecot's configuration file at
/etc/dovecot/dovecot.conf and change the IP address there for
her system so that she could use plaintext authentication, i.e., an
unencrypted password (I need to go to her location and change the Outlook
configuration there to use other than plaintext authentication). I didn't
recall that change was needed until finding a note I had made previously
regarding dovecot's logon_trusted_networks
setting.
The relevant section of the dovecot.conf file is shown below for cases
where plaintext authentication is being allowed.
# Space separated list of trusted network ranges. Connections from these
# IPs are allowed to override their IP addresses and ports (for logging and
# for authentication checks). disable_plaintext_auth is also ignored for
# these networks. Typically you'd specify your IMAP proxy servers here.
login_trusted_networks = 192.168.0.0/24 192.168.7.0/24 10.45.1.12
In this case dovecot was configured to allow plaintext logins from
two 192.68 subnets and her specific IP address. But since her IP address
had changed to a new one, dovecot was no longer permitting plaintext
authentication from her system. After changing the
login_trusted_networks line to match her particular IP address, I
restarted dovecot.
# service dovecot restart
Redirecting to /bin/systemctl restart dovecot.service
When I had her try again, she was then able to download her email.
Note: IP addresses, userid, and password are, of course, not the actual
ones used.
Mac OS X systems come with a backup program named Time Machine,
which can be found in the Applications folder. If you attach
an external drive to the system and configure Time Machine to use it,
the program will backup the system automatically and maintain the following
backups:
Hourly backups for the past 24 hours
Daily backups for the past month
Weekly backups for all previous months
The app will delete the oldest backups when the backup drive becomes full.
Juniper NetScreen Firewalls running the ScreenOS operating system, including
older models, such as a
Netscreen-5GT
firewall, can be configured for
Simple Network Management Protocol (SNMP) support to monitor bandwidth
utilization, etc. SNMP information can be viewed or
configured through the web-based interface or via the command line interface
(CLI) using get snmp, set snmp and unset
snmp commands.
Microsoft doesn't provide a telnet program with its current operating systems
by default, but a commonly used program for telnet and SSH on Microsoft
Windows systems is
PuTTY which is free. A telnet client is provided with many Linux
distributions and one is available with Apple's OS X operating system.
PuTTY is also available for Unix/Linux systems. E.g., see
How To Install & use Putty in Ubuntu Linux written by Pradeep Kumar
on July 13, 2014.
With a telnet program you can send commands/headers to a web server to emulate
those that a browser would send to a web server and observe the responses
from the server. This can be useful in some troubleshooting efforts. E.g,
see Testing acces to a website
using PuTTY for how to configure PuTTY on a Microsoft Windows system to
perform a basic connectivity test to port 80 and request a web page for
a particular site from the server.
Oftentimes I've found that a web browser is responsible for high memory
utilization or high CPU usage on a system. But determing what tab or tabs
is culpable can be difficult. Fortunately, Google provides a mechanism for
doing so within its Chrome browser. By putting chrome://memory
in the address bar in a tab within the browser, you can get details on
the total memory usage by all browsers open on the system and the memory
consumed by tabs within Chrome.
Clonezilla,
which is a live
CD based on Debian Linux, provides the capability to clone one disk
drive to another. You can boot a system from the live CD and
make an image copy of one drive to another. Alternatively, you can store
an image of an entire drive or partitions on a drive in files on another
drive. If the drive to be used for the backup is not already partitioned
and formatted, you can obtain a command prompt and use the fdisk
command to partition the drive and mkfs.ext3 to format the
drive.
On a Mac OS X system, at the bottom of the display you see when you hold
down the Option key while clicking on the icon for wireless
networking, you will see "Open Wireless Diagnostics"; select that option
to start the wireless networking diagnostics program provided by Apple. The
utility can be used for troubleshooting Wi-Fi network problems and to
generate a report of information related to wireless networking on the system,
which may assist you with troubleshooting Wi-Fi issues on the system.
I need to transfer files through a
bastion host
periodically. To edit files on a webserver, I need to first establish a
Secure Shell (SSH)
connection to the bastion host, logging in using an
RSA SecurID token.
Once I've provided my login credentials, the bastion host prompts me for
the system to which I want to connect to from it, which in this case
is the web server. So my ssh login to the webserver is
tunneled through the bastion host.
I normally go through the process once a month from my MacBook Pro laptop
running the OS X operating system when I need to place a monthly newsletter on
the web server. I use an SSH command similar to the following to log into
the bastion host where gold.example.com is the
fully qualified domain name (FQDN) of the web server and
bastion1.example.com is the bastion host.
The -L option specifies I want to tunnel a local port on
my laptop, in this case I chose 22001, to port 22 on the web server,
gold.example.com. A tunnel is set up from my laptop to the web server
through the bastion host by using that option once my login is completed
to the bastion host.
Then, to transfer a file via
secure copy from my laptop to the web server, I can use a command like
the following one to transfer a file named July.txt from the laptop
to the web server:
The -P option to the scp command specifies I want to use
TCP
port 22001, since that is the port for the end of the tunnel on my laptop.
The 127.0.0.1 address I'm specifying is the
localhost, aka
"loopback", address on my laptop. I.e., I'm connecting to port 22001 on
the laptop itself. The tunnel I set up earlier results in any connection
to that port being forwared through the tunnel to the web server, so
I'm specifying my userid for the web server and the password prompt I
receive is for the web server. The file July.txt will thus be placed
in the directory /data/htdocs/clubs/groot/newsletter/2015
on the web server with the same name, July.txt.
If I wanted to pull a file from the webserver via the tunnel, I could
use a command such as the following:
The vsftpd package can be used on a CentOS 7 system to provide FTP server
service from the system. After installing the package, you may want to
customize its configuration for your needs. After configuring it, you
will need to start the service with systemctl start vsftpd
and will need to issue the systemctl enable vsftpd command
to ensure it starts automatically when the system boots. You will also
need to allow FTP connectivity in to the system from FTP clients by
configuring the firewall software on the CentOS 7 systems as well,
which by default is firewalld for CentOS 7 systems.
You can check the current policies in a Juniper NetScreen firewall running
the ScreenOS operating system, such as a
Netscreen-5GT
firewall,
with get policy all, but you can also display just those
policies affecting transmissions from one particular zone to another zone
by adding a from from_zone to to_zone to the end
of the command. E.g. get policy from untrust to trust would show
only those policies that apply to traffic from the untrust zone to the trust
zone.
To view only those policies that apply to a particular service, such
as FTP, I could use get policy from untrust to trust | include FTP.
ns5gt-> get policy from untrust to trust | include FTP
24 Untrust Trust ACME VPN VIP(untrust) FTP Permit enabled ---X-X
25 Untrust Trust ACI VIP(untrust) FTP Permit enabled ---X-X
ns5gt->
Steps are listed here
that can be used to create a policy that will allow FTP connectivity
from external systems to an internal FTP server behind the firewall.
I thought I had allowed access from all internal systems on the same
LAN to phpMyAdmin on the
webserver by modifying phpMyAdmin.conf to allow access from
the subnet on which the internal systems resided. I checked the configuration
file again and it appeared I had allowed access there.
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1 192.168.0
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1 192.168.0
Allow from ::1
</IfModule>
</Directory>
Since the internal systems were on a 192.168.0.0/24 subnet, I had
added 192.168.0 previously to the Require IP
and Allow from lines, so that access was allowed both from the
localhost address,
127.0.0.1, i.e., from the system itself, and from other systems on the LAN.
I knew I had done that quite some time ago and that the Apache webserver
had been restarted a number of times subsequent to that change.
I checked the IP address the server was seeing for the system from
which I had tried accessing it using
http://www.example.com/phpMyAdmin and realized it was seeing
the external IP address of the firewall behind which the webserver resides,
because I had used the
fully
qualified domain name (FQDN) for the server, i.e., www.example.com, which
caused the connectivity from the internal system to the web server to go
out through the firewall and back in. When I used the internal IP address
for the webserver on which phpMyAdmin resided with
http://192.168.0.22/phpMyAdmin, I was able to access the phpMyAdmin interface
from an internal system on the LAN on which it resides.
If you wish to monitor the performance of an OS X system, Apple provides
a number of utilities with the operating system to allow you to monitor
CPU, memory, and network utilization as well as other system parameters.
The Activity Monitor found in
Applications/Utilities provides a graphical user interface
(GUI) for monitoring CPU, memory, and, to a limited extent, network
utilization. The top command found on Linux systems is also
present and provides a command line tool for monitoring memory and CPU
utilization. For network monitoring, there is also the
Network Utility in
Applications/Utilities.
If you are using Google Sheets, which is a free online spreadsheet
service that is part of
Google Docs, for spreadsheets and need to define a name for a cell as
one can do in Microsoft Excel, select the cell for which you wish to create
a name so that you can reference the cell by that name rather than its
specific location, such as Sales!B3 to reference the cell in column B row 3
on the Sales worksheet, take the following steps, assuming you wished the
name to be Bobs_Sales:
Select Data from the menu bar at the top
of the spreadsheet window.
Select Named ranges.
Click on Add a range.
Fill in the name you wish to use to refer to the cell and below it the
location, which can include the sheet name, if you have multiple worksheets
in the spreadsheet, followed by an exclamation mark, i.e., !,
and then the cell location, i.e., columan and row, e.g., Sales!B3.
Click on Done to add the name and close the Named ranges
window by clicking on the "X" in the upper, right-hand corner.
You could then put =Bobs_Sales in a cell in the same
sheet or another sheet in the workbook to have the value stored in
Sales!B3 appear in the location where you've placed =Bobs_Sales.
That allows you to use a name that is easy for you to remember rather than
having to remember or look up the specific location for the data.
I wanted to put a time stamp in a log file whenever a script on a Linux
system is run. If you just enter date with no parameters at
a shell prompt, you will see something like the following:
$ date
Sun Jun 21 16:10:49 EDT 2015
But you can modify how the output from the date command is presented by
specifying command line parameters for the command using
date +format, where format is how you wish the
output formatted. Parameters that can be used to format the display are listed
below:
Format String
Description
%%
a literal %
%a
locale's abbreviated weekday name (e.g., Sun)
%A
locale's full weekday name (e.g., Sunday)
%b
locale's abbreviated month name (e.g., Jan)
%B
locale's full month name (e.g., January)
%c
locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
%C
century; like %Y, except omit last two digits (e.g., 21)
%d
day of month (e.g, 01)
%D
date; same as %m/%d/%y
%e
day of month, space padded; same as %_d
%F
full date; same as %Y-%m-%d
%g
last two digits of year of ISO week number (see %G)
%G
year of ISO week number (see %V); normally useful only with %V
%h
same as %b
%H
hour (00..23)
%I
hour (01..12)
%j
day of year (001..366)
%k
hour ( 0..23)
%l
hour ( 1..12)
%m
month (01..12)
%M
minute (00..59)
%n
a newline
%N
nanoseconds (000000000..999999999)
%p
locale's equivalent of either AM or PM; blank if not known
%P
like %p, but lower case
%r
locale's 12-hour clock time (e.g., 11:11:04 PM)
%R
24-hour hour and minute; same as %H:%M
%s
seconds since 1970-01-01 00:00:00 UTC
%S
second (00..60)
%t
a tab
%T
time; same as %H:%M:%S
%u
day of week (1..7); 1 is Monday
%U
week number of year, with Sunday as first day of week (00..53)
%V
ISO week number, with Monday as first day of week (01..53)
%w
day of week (0..6); 0 is Sunday
%W
week number of year, with Monday as first day of week (00..53)
%x
locale's date representation (e.g., 12/31/99)
%X
locale's time representation (e.g., 23:13:48)
%y
last two digits of year (00..99)
%Y
year
%z
+hhmm numeric timezone (e.g., -0400)
%:z
+hh:mm numeric timezone (e.g., -04:00)
%::z
+hh:mm:ss numeric time zone (e.g., -04:00:00)
%:::z
numeric time zone with : to necessary precision (e.g., -04
, +05:30)
E.g., if I wanted to display the date in the form of year-month-day, I
could use the following:
$ date +"%y-%m-%d"
15-06-21
If you use a lowercase "y", then the year will be displayed as a two-digit
year, i.e. "15" in this case for 2015, but if I wanted to have the year
displayed as a four-digit year, I could use an uppercase "Y" as shown below:
$ date +"%Y-%m-%d"
2015-06-21
In this case I also wanted to log the time in 24-hour format, aka
"military time", on the same line as the date, so I could append a
%T.
$ date +"%Y-%m-%d %T"
2015-06-21 16:31:40
If I wanted to store the results of the command in a variable, I could
use the following:
If you see a "Markup Data Folder does not exist!" error message while
you are using the CoffeeCup HTML Editor, which is a program used to edit
pages for a website, which references a directory,
such as "C:\Users\Public\Documents\CoffeeCup Software\HTML
Editor\Markup\HTML4.01\." it may be because you installed CoffeeCup
HTML Editor using a different account than the one you are now using.
I encountered that error after installing the software for a family member.
I had installed the software under an administrator account, but when I
was later testing the software under her account I saw that error message
appear frequently. You can remedy the problem by copying fhe folder from
the account under which it was installed to another account where you
wish to use the software.
You can do that In Windows 8 while logged into a non-privileged account, i.e.,
one that isn't in the administrator group, by right-clicking on the
Start button, then choosing Command Prompt (Admin) and
providing a userid and password for an account that is in the administrator
group. E.g., in this case I provided the credentials for the account under
which I installed the software, since it was an account in the administrator
group.
You can find the Markup directory beneath
C:\Users\userid\AppData\Roaming\CoffeeCup Software\CoffeeCup
HTML Editor\Markup where userid is the user name for the
account under which you installed the CoffeCup HTML Editor. E.g., supposing
the userid was JDoe, I would see the following:
Volume in drive C has no label.
Volume Serial Number is 5C60-1B61
Directory of C:\Users\JDoe\AppData\Roaming\CoffeeCup Software\CoffeeCup HTML Editor\Markup
06/12/2015 12:51 PM <DIR> .
06/12/2015 12:51 PM <DIR> ..
06/12/2015 12:51 PM <DIR> CSS2.1
06/12/2015 12:51 PM <DIR> CSS3
06/24/2010 11:44 AM 3,055 doctypes.txt
06/12/2015 12:51 PM <DIR> Entities
06/12/2015 12:51 PM <DIR> HTML
03/12/2014 09:45 AM 22,830 html-entities.conf
06/12/2015 12:51 PM <DIR> HTML4.01
06/12/2015 12:51 PM <DIR> HTML5
06/12/2015 12:51 PM <DIR> Markdown
03/06/2014 09:43 AM 70,692 opengraph.dat
12/16/2013 08:22 AM 944,004 schema.dat
06/12/2015 12:51 PM <DIR> XHTML1
06/28/2010 02:17 PM 93 _default.css
5 File(s) 1,040,674 bytes
10 Dir(s) 3,738,071,187,456 bytes free
From an admin command prompt, I could then copy the contents to a similar
location under another account where I want to be able to use the software.
E.g., supposing I wanted to copy from the JDoe account to a
Jane account, I could use the xcopy command below.
xcopy /s "C:\Users\JDoe\AppData\Roaming\CoffeeCup Software\CoffeeCup HTML Editor" "C:\Users\Jane\AppData\Roaming\CoffeeCup Software\CoffeeCup HTML Editor\."
There are over 800 files in the folder and its subfolders. Once they
are copied, if you had the HTML Editor open during that process, close and
reopen it.
I also encountered a problem while configuring the HTML Editor to display
files in browsers on the system, which gives you the opportunity to see what
a page will look like in multiple browsers. That problem was also related
to directory permissions, since the CoffeeCup HTML Editor was attempting
to create files in a directory where only accounts in the administrator
group should be able to create files - see
Configuring CoffeCup HTML
Editor for browser support.
On an Ubuntu Linux system, you can use the iwconfig command
at a shell prompt, i.e., a command line interface, to view information on
available networks. Iwconfig is part of the wireless-tools package.
If you are currently connected to a wireless network, you will see
something similar to the following, if you run the command with no
arguments specified. In the example below, the system is connected to a
wifi network that has a
service set identification (SSID) of
T28J5 at a bit rate of 1 Mbs.
$ iwconfig
lo no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"T28J5"
Mode:Managed Frequency:2.412 GHz Access Point: 00:1F:90:B2:9F:A4
Bit Rate=1 Mb/s Tx-Power=14 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=70/70 Signal level=-33 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:65 Missed beacon:0
eth0 no wireless extensions.
You can specify a wireless interface to avoid the display of
extraneous information for interfaces that are not wireless interfaces,
e.g., iwconfig wlan0.
I can see from the above output that the wireless interface supports
the
802.11 b, g, and n standards.
The arguments for the command can be seen by issuing the command
iwconfig --help at a shell prompt.
$ iwconfig --help
Usage: iwconfig [interface]
interface essid {NNN|any|on|off}
interface mode {managed|ad-hoc|master|...}
interface freq N.NNN[k|M|G]
interface channel N
interface bit {N[k|M|G]|auto|fixed}
interface rate {N[k|M|G]|auto|fixed}
interface enc {NNNN-NNNN|off}
interface key {NNNN-NNNN|off}
interface power {period N|timeout N|saving N|off}
interface nickname NNN
interface nwid {NN|on|off}
interface ap {N|off|auto}
interface txpower {NmW|NdBm|off|auto}
interface sens N
interface retry {limit N|lifetime N}
interface rts {N|auto|fixed|off}
interface frag {N|auto|fixed|off}
interface modulation {11g|11a|CCK|OFDMg|...}
interface commit
Check man pages for more details.
You can also use the iwlist command to display some additional
information from a wireless network interface that is not displayed
by iwconfig. The main argument is used to select a category of
information; iwlist displays in detailed form all information related
to this category, including information already shown by iwconfig.
The options, which you can view by typing
iwlist --help or just iwlist at a shell
prompt, for the command are shown below:
If you are connected to a wireless network already, you can view
information on that network by typing ifwlist scan. E.g.,
in the example below, the system is connected to a wireless network
that has a
SSID of T28J5, which can support a maximum transmission rate of 54 Mbs.
If you know the designation for the wireless interface in the system,
e.g. wlan0 in this case, you can avoid attempting to scan
interfaces, such as eth0, which is a wired rather than wireless interface,
by specifying the wireless interface when issuing the command, e.g.,
iwlist wlan0 scan.
You can see the current bitrate with iwlist <interface>
bitrate.
$ iwlist wlan0 bitrate
wlan0 unknown bit-rate information.
Current Bit Rate=1 Mb/s
If you are already connected to a wifi network and want to disconnect
you can type ifconfig interface down where
interface is the designation for the relevant wireless interface,
e.g., wlan0. You can see a list of all available interfaces
with ifconfig -a. If you don't run the ifconfig
wlan down command from the root account or use sudo on a Ubuntu
system, you will receive a "permission denied" error message. You can use
sudo ifconfig to run the command from an account with
sudo privileges.
$ ifconfig wlan0 down
SIOCSIFFLAGS: Permission denied
$ sudo ifconfig wlan0 down
[sudo] password for jdoe:
$
But with the above method, the system may bring the interface back up
automatically a few seconds later. You can use the command-line tool
nmcli for controlling NetworkManager, instead. To disable
the wifi interface, you can use nmcli nm wifi off.
$ nmcli nm wifi off
$
You can re-enable the wifi interface with nmcli nm wifi on.
If the system has previously connected to an available wifi network and
has the credentials stored to automatically connect to that network, when
you issue the nmcli nm wifi on command, it will automatically
reconnect to the network.
You can see the current status of the wifi interface with nmcli nm
wifi. E.g., if it is enabled, you would see the following:
$ nmcli nm wifi
WIFI
enabled
If you wish to see a list of the stored wifi networks you can use
the nmcli con command, which shows information about
NetworkManager's connections. For information on a particular one
you can use nmcli con list id identifier, where
identifier is the id for the wireless network, e.g.,
T28J5 or in the example below VA Internet for
the guest network at a hospital.
$ nmcli con list id "VA Internet"
connection.id: VA Internet
connection.uuid: 8cd16736-f340-42a8-b103-1b87d24973b9
connection.type: 802-11-wireless
connection.autoconnect: yes
connection.timestamp: 1434474233
connection.read-only: no
connection.permissions:
802-11-wireless.ssid: 'VA Internet'
802-11-wireless.mode: infrastructure
802-11-wireless.band: not set
802-11-wireless.channel: 0
802-11-wireless.bssid: not set
802-11-wireless.rate: 0
802-11-wireless.tx-power: 0
802-11-wireless.mac-address: 90:4C:E5:2F:6F:2E
802-11-wireless.cloned-mac-address: not set
802-11-wireless.mac-address-blacklist:
802-11-wireless.mtu: auto
802-11-wireless.seen-bssids:
802-11-wireless.security: not set
ipv4.method: auto
ipv4.dns:
ipv4.dns-search:
ipv4.addresses:
ipv4.routes:
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: not set
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: not set
ipv4.never-default: no
ipv4.may-fail: yes
ipv6.method: auto
ipv6.dns:
ipv6.dns-search:
ipv6.addresses:
ipv6.routes:
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
If you run the ping command in windows with no parameters specified other
than the system to ping, the output will look similar to the following:
C:\>ping google.com
Pinging google.com [216.58.217.142] with 32 bytes of data:
Reply from 216.58.217.142: bytes=32 time=12ms TTL=55
Reply from 216.58.217.142: bytes=32 time=16ms TTL=55
Reply from 216.58.217.142: bytes=32 time=13ms TTL=55
Reply from 216.58.217.142: bytes=32 time=13ms TTL=55
Ping statistics for 216.58.217.142:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 12ms, Maximum = 16ms, Average = 13ms
If I want to just see the ping times and no other output from the ping
command, I could use a FOR /F
command such as is shown below. The "pipe" character, |, used to
pipe output from one command to another should be prefixed with ^,
which serves as an
"escape character".
C:\>for /f "tokens=7 delims== " %g in ('ping google.com ^| find "Reply from"') do @echo %g
22ms
15ms
13ms
22ms
To do the same thing from a batch file, I could put the following
commands in a batch file:
@echo off
set HostToPing="google.com"
for /f "tokens=7 delims== " %%g in ('ping %HostToPing% ^| find "Reply from"') do echo %%g
The differences are that I would need to use %%g, instead of
%g in the batch file and I could use echo in the
batch file rather than @echo, since I put @echo as
the first line of the batch file to turn off the display of the comands
themselves.
By default, when you run the ping command on a Microsoft Windows system,
it will issue 4 pings then stop. But you can control the number of pings
sent by using the -n count parameter, where count is the
number of pings to send.
-n count Number of echo requests to send.
If I want to monitor the average response time to pings to a given host
over a long period of time, I could issue the ping command with a very large
number of echo requests specified or use the -t parameter,
e.g., ping -t to have the pings run indefinitely:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
I could store the results in a file by redirecting
output from the command with the output redirection character
>, i.e., ping -n 500000 google.com
>pingoutput.txt. Or I could just look at the line where ping displays
the average and create a loop where pings are run periodically. The line
where the average is shown by ping looks like the following:
Minimum = 14ms, Maximum = 17ms, Average = 15ms
To just look at that average value, but also time stamp the output,
so I can determine if ping times to a particular host are changing
significantly over the course of a day, I could use code similar to the
following in a batch file, substituting the particular host I'm interested
in for google.com and using the
timeout command present in Microsoft Windows 7/2008 and later versions
to specify the pause period between instances of the ping command being
run. The timeout command is similar to the sleep or wait commands that may
be present in other operating systems. In the example below the timeout
value is 2 minutes. In this case >>
must be used to append to the output file, since > would
overwrite the output file each time ping was run.
@echo off
set HostToPing="google.com"
:loop
set datetime=%date% %time%
for /f "tokens=9" %%g in ('ping %HostToPing% ^| find "Average ="') do echo %datetime% %%g >>ping_times.txt
timeout /t 120
goto loop
If I name the batch file avgpingtime.bat and run it from a command prompt, I
would see the following until the batch file is stopped with Ctrl-C.
C:\>avgpingtime
Waiting for 0 seconds, press a key to continue ...
Waiting for 0 seconds, press a key to continue ...
Waiting for 0 seconds, press a key to continue ...
Waiting for 0 seconds, press a key to continue ...
Waiting for 0 seconds, press a key to continue ...
Waiting for 0 seconds, press a key to continue ...
Waiting for 0 seconds, press a key to continue ...
Waiting for 0 seconds, press a key to continue ...
Waiting for 14 seconds, press a key to continue ...
Until the batch file s terminated with Ctrl-C, it
would display its countdown from 120 to 0 each time the timeout
command is executed. The results stored in the text file would be
similar to the following:
A default installation of sendmail usually yields a configuration where
sendmail will only accept email from email clients on the server on which
sendmail is running. Usually, you will want to allow external email servers
to send email to valid email addresses on the server. To do so, edit
/etc/mail/sendmail.mc. Comment out the following line by putting
dnl at the beginning of the line:
You then need to rebuild the /etc/mail/sendmail.cf file
from the /etc/mail/sendmail.mc file using the m4
command as shown below:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Once you've rebuilt the sendmail.cf file, you need to restart
sendmail. You may be able to restart sendmail with a
/etc/init.d/sendmail restart command, though on some Linux
systems, e.g., CentOS 7, you will see a No such file or directory
error message, if you try that command. On a CentOS 7 system, you can
restart sendmail with systemctl restart sendmail.
# /etc/init.d/sendmail restart
-bash: /etc/init.d/sendmail: No such file or directory
# systemctl restart sendmail
#
Or you can also use service sendmail restart on a CentOS 7
system to restart sendmail.
# service sendmail restart
Redirecting to /bin/systemctl restart sendmail.service
#
Once you've restarted sendmail, external servers sending email to
domain names present
in the local-host-names file, should no longer receive "relaying denied"
error messages in bounced email. They still would not be able to send email
to email addresses for domain names not in that file. I.e., the server won't
function as an "open
mail relay".
If you wish to know which package provides a particular file on a CentOS
system, you can use the yum whatprovides command followed by
the path to the file and its name. E.g., if I wanted to determine what package
provides the mysql command on a system, I could determine its
location with the which command and then use the
yum whatprovides command to determine the package that included
the file.
$ which mysql
/usr/bin/mysql
$ yum whatprovides /usr/bin/mysql
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.umd.edu
* epel: mirror.us.leaseweb.net
* extras: mirror.nexcess.net
* updates: mirror.cs.pitt.edu
1:mariadb-5.5.41-2.el7_0.x86_64 : A community developed branch of MySQL
Repo : base
Matched from:
Filename : /usr/bin/mysql
1:mariadb-5.5.41-2.el7_0.x86_64 : A community developed branch of MySQL
Repo : @updates
Matched from:
Filename : /usr/bin/mysql
From the above output, I can see the mysql program was provided in the
mariahdb package.
Another means to determine what package provided a file installed on
the system is to use the
RPM Package
Manager (RPM) utility.
Details on that package could be obtained by using the
rpm -qi mariadb command.
$ rpm -qi mariadb
Name : mariadb
Epoch : 1
Version : 5.5.41
Release : 2.el7_0
Architecture: x86_64
Install Date: Mon 16 Feb 2015 09:33:02 PM EST
Group : Applications/Databases
Size : 50862464
License : GPLv2 with exceptions and LGPLv2 and BSD
Signature : RSA/SHA256, Thu 05 Feb 2015 11:27:55 AM EST, Key ID 24c6a8a7f4a80eb5
Source RPM : mariadb-5.5.41-2.el7_0.src.rpm
Build Date : Thu 05 Feb 2015 11:12:40 AM EST
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org>
Vendor : CentOS
URL : http://mariadb.org
Summary : A community developed branch of MySQL
Description :
MariaDB is a community developed branch of MySQL.
MariaDB is a multi-user, multi-threaded SQL database server.
It is a client/server implementation consisting of a server daemon (mysqld)
and many different client programs and libraries. The base package
If you are interested in what package may provide a file that isn't
currently installed on a system, you could use the yum whatprovides
command or, alternatively use the
www.rpmfind site to perform a search on the file name. In this
case, for mysql, the site will return a long list of packages that could provide
the file.
In order to configure sendmail to accept email for a particular domain name,
you need to add the domain name to /etc/mail/local-host-names.
E.g., suppose sendmail on my server accepts email for
moonpoint.com, but I also want it to handle email for example.com. I would
then edit the /etc/mail/local-host-names file adding
example.com to the the file, so it would contain the following
lines:
# local-host-names - include all aliases for your machine here.
moonpoint.com
example.com
Any line that begins with the pound or hash character, i.e., #,
is a comment and domain names are added one per line. After editing the
file, you need to generate a new local-host-names.db file by
running the command below from the root account:
# makemap hash /etc/mail/local-host-names < /etc/mail/local-host-names
makemap: /etc/mail/local-host-names: line 2: no RHS for LHS moonpoint.com
makemap: /etc/mail/local-host-names: line 6: no RHS for LHS example.com
Don't worry about the "no RHS for LHS" lines; they are to be expected.
You can verify that your sendmail server will now handle email for the
new domain by using the sendmail -bv command followed by the
name of an account or alias on the system (aliases are added to
/etc/aliases and a new aliases list generated by running
newaliases). E.g., if jan is the name of an account on
the system, I could then test that email will be delivered to the local
jan account if I were to send a message to jan@example.com.
# sendmail -bv jan@example.com
jan@example.com... deliverable: mailer local, user jan
The "mailer local, user jan" reference informs me that sendmail will
deliver email addressed to jan@example.com to the local jan account. When
I ran the command prior to updating the local-host-names file, I saw the
following:
The "mailer relay" reference informed me that sendmail was not configured
to deliver email to the local account if someone on the system sent email
to jan@example.com, but would, instead, send the email through another email
server to what it believed was an external email account.
To get external email servers to use the server on which I'm running
sendmail to delier email for the example.com domain, I need to have an
appropriate mail exchanger
(MX) record configured for the domain - see
Checking MX Records - or at least
ensure that there is no MX record pointing to some other server. E.g., I
could use the command nslookup -querytype=mx example.com to
check the MX records for example.com.
If my server running sendmail is accessible at the IP address for
smtp.example.com, then other email servers will send email for any
any email address at example.com to it.
The free PuTTY
program for Microsoft Windows systems allows you to establish SSH connections.
The program includes
port forwarding capability, so that you can forward connectivity to
a port on the system running PuTTY to a port on the SSH server to which you
have connected using PuTTY or even another system accessible from the SSH
server. E.g., suppose you can remotely connect to a SSH server at your
home or business, but you can't access a web server at home or at the business
location remotely. One option you can use is have PuTTY "listen" on the system
on which it runs on a port, e.g., port 8888, and for any connection to that
port on the local system on which PuTTY is running, forward the connection
to the remote web server through the SSH server as explained at
Port forwarding
to another device with PuTTY. Such port forwarding can be performed
to any TCP port.
Alternatively, you can set up a
SOCKS proxy using PuTTY as noted at
Using PuTTY to set up a SOCKS Proxy
Connection. Instructions for configuring some browsers ito use a
SOCKS proxy are provided from the links below:
I've found that a MacBook Pro laptop I use often will slow unbearably. When
I check the cpu utilization, I usually find some third-party application is
consuming an inordinate amount of CPU time slowing the system. Today the
problem was due to the AgentService process associated with an enterprise
backup program, Connected Backup, from Hewlett Packard (HP). HP acquired the
software when it purchased
Autonomy Corporation, which had itself obtained the software through
the purhcase of Iron Mountain's technology arm, "Iron Mountain Digital".
Previously, I've seen the same
CPU utilization problem due to the
AMPAgent process from Kace.
When you go to websites where a form is present with fields for an email
address, etc., such as the Facbook page for logging into the site, when
you click on the field for the email address you may see a list of email
addresses that the browser has saved to auto fill fields in forms for
you. If you wish to have the browser "forget" those email addresses and
other information, the steps to take are as follows:
To import an Amazon affiliate report into Excel 2013, download the report
as a tab separated values (TSV) report, then take the following steps in
Microsoft Excel 2013 to import the data, which can also be used for any
text file containing tab delimited data:
Click on File.
Click on Open.
Under Open select the location where the downloaded file is located and
select the report.txt file you downloaded.
A "Text Import Wizard Step 1 of 3" window will open. You can check the check
box next to "My data has headers". You can skip the first title row, if you
wish, by changing the "Start import at row" value from the default value of 1.
Click on Next when you've made any changes needed.
At step 2, leave "Tab" selected as the delimiter and click on Next.
At step 3, you can leave "General" selected for the "Column data format" and
click on Finish.
Once the data is imported, you can click on the vertical lines between the
column headers to adjust the width of individual columns to accomodate column
titles and data. Or to have the text wrap within the current column width, you
can click on a column designator, such as "A", "B", etc., or
click on the "1" to the left of the first row to choose all columns
on that row, and then right-click and choose Format Cells,
Alignment, and then select Wrap Text under Text
Control, and then click on OK.
To save the file in an Excel spreadsheet format, select File
and Save As, select a location and name for the file, and then
change the "Save as type" value from "Text (Tab delimited) (*.txt)" to
"Excel Workbook (*.xlsx)" or other file type.
If you wish to import a contact list from Microsoft Outlook into
Event Planner 2015, which is part of
Hallmark Card Studio 2015,
first export the contact list from Outlook into a format that Event Planner can
import, such as a Microsoft Access .mdb, Excel .xls, or
comma separated
values (CSV) file, e.g., see
Exporting contacts from Outlook 2010.
Though, when I tried importing from a Microsoft Access .mdb file, a
ODBC Microsoft Access Driver Login Failed window opened with the
message "Unrecognized database format 'C:\Users\Jane\Documents\Contacts.mdb'"
after I was prompted for a login name and password, so I exported the data
as an Excel .xls file, instead. I was able to successfully import from an
Excel .xls spreadsheet.
Once you have exported the data from Outlook, in Event Planner, click on
File then select Import. When prompted to "Select the data
source you are importing from, select "Access (*.mdb), Excel (*.xls)
or Comma Delimited (*.csv) files". The other options are "Existing
Event Planner installation" and "Outlook Express". Outlook Express
is a different application than Outlook, though both were created by
Microsoft, and stores information in its own format, which is not the
one used by Microsoft Outlook, so you will need to import from an mdb,
xls, or csv file.
After clicking on Next, browse to the location of the
file you exported, e.g. Contacts.xls, and select it then click on
Next. You will then need to map fields from the imported file
to Address Book fields in the Event Planner.
Some Outlook fields won't have an exact match with Event Planner fields.
E.g., Outlook has a company name field for its contacts, whereas the
Event Planner does not, so you will have to map a company name to last name.
To perform the mapping, you will need to click on an entry in the left-most
"Select a value from your database" column in the Import Address Book Fields
window, then select an entry from "Choose the Address Book field to which you
want to map the value", and then click on the Add button to complete the mapping. You may have to open the exported file in an application such as
Excel to determine what the column headers are for entries to make an
appropriate mapping. You may not even need to map some values if you feel
you don't need them in the Event Planner contact list, e.g., "gender",
"sensitivity", etc. have no comparable Event Planner fields.
You will need to do this for each entry in the left column
Note: Tested with Event Planner 2015 version 3.0.3.1, which is part of
Hallmark Card Studio 2015, but may apply to other versions as well.
To count the number of cells containing content, i.e., those that aren't
blank, in Google Sheets, which is part of
Google Docs and is
Google's online equivalent of Microsoft Excel you can use COUNTIF
or COUNTA. E.g., suppose you wish to count the number of cells
in column A from A2 to A64 which contain data, ignoring any cells that are
blank. You could use COUNTIF(A2:A64,"<>"). The
"<>", instructs Google Sheets to only count cells that
don't have a null value, i.e., ones containing some data. Alternatively,
you could use COUNTA(A2:A64). If you wanted the number that
were blank, you could use COUNTBLANK(A2:A64).
When you are using the Microsoft Windows command line interface, you may need
to copy the output of commands somewhere else, such as notepad or some
other text editor. You can copy and paste the output of commands by
right-clicking on the Command Prompt title bar and selecting Edit,
then Mark and then highlighting the text you wish to copy in the
command prompt window and hitting Enter to copy it to the Windows
clipboard. Or you can click within the Command Prompt window below the title
bar which will give you the option to select Mark without selecting
Edit first. Either method will then allow you to use Edit
and Paste or Ctrl-V to paste the text into other applications.
Another alternative is to redirect the output of a command to a file using
the redirect character, >. E.g., if you wished to put
the output of the dir command in file example.txt,
you could use dir > example.txt.
If you wish to see the output in the command window and also have it
copied to the clipboard at the same time, another alternative is to use
the "pipe" character, | followed by clip. E.g.,
if you wanted to see all the files in a directory with many files and also
have the output of the command placed in the Windows clipboard, you could
use dir | clip. You could then paste the contents of
the clipboard into other applications.
To determine if a package is installed on a Ubuntu Linux system, you can
use the command dpkg -s packagename where packagename
is the name of the package.
$ dpkg -s python-software-properties
Package: python-software-properties
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 196
Maintainer: Michael Vogt <michael.vogt@ubuntu.com>
Architecture: all
Source: software-properties
Version: 0.82.7.5
Depends: python2.7, python (>= 2.7.1-0ubuntu2), python (<< 2.8), python-apt (>= 0.6.20ubuntu16), lsb-release, python-gnupginterface, unattended-upgrades, iso-codes, python-pycurl
Description: manage the repositories that you install software from
This software provides an abstraction of the used apt repositories.
It allows you to easily manage your distribution and independent software
vendor software sources.
If a package isn't installed, you will see output similar to the following:
$ dpkg -s linssid
Package `linssid' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
You can use the dpkg-query -l command with the wild card
character, *, to see a list of packages that match a specified
pattern. E.g., to see all packages that begin with python-py:
$ dpkg-query -l 'python-py*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
un python-pyatspi <none> (no description available)
ii python-pyatspi 2.4.0+dfsg-0ub Assistive Technology Service Provider Interf
ii python-pycurl 7.19.0-4ubuntu Python bindings to libcurl
un python-pycurl- <none> (no description available)
un python-pygment <none> (no description available)
un python-pyicu <none> (no description available)
ii python-pyinoti 0.9.2-1 simple Linux inotify Python bindings
un python-pyinoti <none> (no description available)
un python-pylons <none> (no description available)
An asterisk, "*", can represent one or more characters. You can also
use a question mark, "?", to represent just one instance of any character.
E.g.:
$ dpkg-query -l 'xin*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii xinit 1.3.1-1 X server initialisation tool
ii xinput 1.5.99.1-0ubun Runtime configuration and test of XInput dev
jim@lancelot:~/Documents/blog$ dpkg-query -l 'xin??'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii xinit 1.3.1-1 X server initialisation tool
To get a list of all packages on the system, use dpkg-query -l.
My wife asked me to help her cut a large number of
Woodsies Craft Sticks for floorboards for a doll house project she has
started. The wooden craft sticks, which look like large popsicle sticks or
tongue depressers, have rounded ends, but she needed square ends for some
and others with a 45-degree angle at the ends. I thought I could simply
cut them with a pair of electrician's scissors, which worked well for
the first couple of craft sticks I cut; it was easy to cut through them
with the scissors and the scissors left fairly smooth edges, but I found
after the first couple of sticks that subsequent cuts through other sticks
tended to splinter the cut ends. My saws were too large, but she had a
Revell Razor Saw designed
for craft projects which worked well, but, since I had to go to the local
True Value hardware store for some C-clamps anyway, I looked for something
there that might help speed cutting through a large number of the craft
sticks. I found a Master Mechanic
Mult Cutter there, which uses blades similar to what you might find
in a box cutter. I found it was easy to put a stick on its anvil and
then cleanly and easily cut through the craft sticks by squeezing its
handle, which pressed the blade through the stick and against the anvil.
I thought I'd note the tools used here, so I'd know what to buy should
I need to replace the blades in the tools in the future or should anyone
else possibly be looking for tools to cut those craft sticks, since I've
seen others noting problems cutting similar items without frayed/splintered
ends, e.g.,
What is the best way to cut popsicle sticks?
The Simple Network Management Protocol (SNMP) provides a mechanism
for managing network-connected devices using a standard protocol for a
wide variety of networked devices, such as routers, switches, servers,
workstations, printers, etc. Microsoft Windows systems support SNMP, but they
are not configured by default to support SNMP. But once you've installed and
configured SNMP on a Windows system you can monitor a variety of system
parameters on it from an SNMP network management system. Steps for configuring
SNMP on a Microsoft Windows 7 system are detailed
here.
If Microsoft Office 2013 is installed on a PC and you need to know
the product key, but there is no product key sticker on the system,
you can obtain the product key from a command prompt using the command
cscript “C:\Program Files (x86)\Microsoft Office\Office15\OSPP.VBS”
/dstatus for the 32-bit version or
cscript “C:\Program Files\Microsoft Office\Office15\OSPP.VBS” /dstatus
for the 64-bit version. If Microsoft Office is installed beneath
Program Files (x86) that indicates you have the 32-bit version,
since that is where 32-bit versions of applications are installed.
But you will only be shown the last 5 characters of the 25-character
product key, because, unlike with prior versions of Microsoft Office, Microsoft
is no longer storing the entire product key in the registry where it can be
retrieved. So the product key you obtain is only likely useful to you if
you have multiple Microsoft Office 2013 product keys and need to determine
which one is used on which system. Or if you purchased the software online
and received the product key by email, you could use those last 5 characters
to search your email or your system for any message or file containing the
full product key.
When you run the commands, you will see output similar to the following:
C:\>cscript "\Program Files\Microsoft Office\Office15\OSPP.VBS" /dstatus
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
---Processing--------------------------
---------------------------------------
SKU ID: 064383fa-1538-491c-859b-0ecab169a0ab
LICENSE NAME: Office 15, OfficeProPlusR_Retail edition
LICENSE DESCRIPTION: Office 15, RETAIL channel
LICENSE STATUS: ---LICENSED---
Last 5 characters of installed product key: B96XY
---------------------------------------
---------------------------------------
---Exiting-----------------------------
If the software was preinstalled on the system, there is likely a sticker
with the full Microsoft Office 2013 product key. But, if it wasn't and you
need the full product key, but can't find it via a search through email
or files on the system, if you registered and activated the software,
you may be able to log into a Microsoft account that you have via Microsoft Office:
My Account. You should be able to see the product key there and
redownload the software, also, if needed. A last resort might be to
contact Microsoft support using contact information from Microsoft's Contact Us page.
But you will likely need some way of proving that you purchased the
software to have any chance of being issued another product key.
The systemsetup -getnetworktimeserver command can be used on
a Mac OS X system to determine the time server with which the system's
clock is being synchronized.. You need administrator access to utilize the
command; you can use sudo to run it if your account has administrative
privileges.
$ systemsetup -getnetworktimeserver
You need administrator access to run this tool... exiting!
$ sudo systemsetup -getnetworktimeserver
Password:
Network Time Server: ntp.example.com
You can set the
Network
Time Protocol (NTP) server with which the system will
synchronize its clock by specifying -setnetworktimeserver,
instead. E.g.:
While checking on a performance problem at a site using a NetScreen 5GT
firewall, I found that when I accessed the Interface Bandwidth report from
the web-based management interface that the report was showing zero Kbps
for the utilized bandwidth on all interfaces, which was obviously wrong, since
data was flowing through the firewall. I found that I needed to enable traffic
shaping mode on the firewall to get that report to actually show the bandwidth
being used for the interfaces on the firewall.
Traffic shaping is a mechanism to give certain types of data flows
precedence over others with lower priority traffic being buffered. In this
case I didn't actually "shape" the traffic, but just enabled traffic shaping
mode so that I could see the current bandwidth being used on interfaces.
While checking the configuration of a Juniper Networks netscreen-5gt
firewall, I noticed that the time was incorrect and that it was not
set up to query a Network Time Protocol (NTP) server to ensure its time was
accurate. To check or set the NTP configuration on a Juniper Networks
NetScreen firewall, From the web management interface, you can check and
set the Network Time Protocol (NTP) information for a Juniper NetScreen
firewall, such as the NetScreen-5GT firewall, by clicking on Date/Time
beneath the Configuration option on the menu.
The NTP configuration can also be viewed and set from a command line
interface accessible by SSH using get ntp and set ntp
commands. Up to three NTP servers can be configured. The time interval for
NTP queries can be specified.
In Corel PaintShop Pro X7, select File, Preferences then
File Locations. In the File Locations window, click on
Plug-ins, which will show the current plug-in file folders. Click
on the Add button and browse to the directory where plugins are
located that you wish to add to PaintShop Pro. Click on OK once you've
located the directory, then click on OK again to close the
File Locations window.
Make sure Enable is checked in the File Locations window
and Use sub folders, if the plug-ins are within a subfolder of a
selected folder.
To use an added plugin, click on Effects, then Plugins, then
select the plugin you wish to use.
For instance, I often use Google to find articles on my own site when
I encounter a problem that I resolved previously while working on someone's
computer when I can't remember exactly what I did previously or the cause
of the same issue when I previously encountered it. I go to google.com and
spcify some keywords I know would be on the page or blog posting I created
and follow the keywords with site:support.moonpoint.com so
Google returns only results from my site. But I've recently found that
Google is reporting it has found no results for my site when I know it should
be finding them since I know the Googlebot has crawled the site subsequent
to my posting the entries on the site, some of which I posted quite some
time ago, and since it has shown me results that indicate it has
indexed material from the site only the day before. Checking the
Index Status report for my site, I found that the number
of pages indexed has declined considerably since this time
last year, whereas I haven't deleted pages and have added over
one hundred pages/blog entries since that time. Checking the Crawl Errors
report, I see quite a few "Not found" entries I need to fix,
but they don't explain the decline in the number of indexed entries,
so I know I need to do further investigation.
I use Quicken 2015 Home & Business to manage our finances. One annoyance
I encountered recently was that when I viewed the details for the mortgage
account, the balance was listed correctly, but on the left side of the screen
where the balances are listed for all accounts, the balance shown for the
mortgage account under the Property section was wrong. The amount
that was displayed was the amount shown for the current balance when I looked
at the transaction display for the account plus the original balance when
we purchased the house. The two balances had matched previously; I think the
incorrect amount under the Property section of Accounts
started appearing with an incorrect amount after I reconciled all of the
transactions in the mortgage account. But even after I unchecked entries to
make them unreconciled to see if that would eliminate the discrepancy, the
discrepancy remained. And that discrepancy resulted in an incorrect
equity being shown when I clicked on Equity when viewing the
mortgage account. The equity was being shown as a negative value, i.e.,
Quicken was claiming I owed more on the house than the house was worth.
I exited from the program then restarted it, but the discrepancy remained.
So I decided to backup the Quicken data file and then perform a repair
operation. So I backed up our data by going to File, Backup and
Restore, then Backup Quicken File. Then, to run a repair
operation, I clicked on File then File Operations. From
that option I could select Validate and Repair, but before I selected
it, I noticed that now the amount shown for the balance owed on the mortgage
was correct under Property in the listing of accounts. It seems
that just performing the backup resulted in the discrepancy being resolved. I
certainly didn't expect that to resolve the problem, but I was glad just doing
that apparently resolved the problem. Quicken was also now showing a correct
positive equity value based on what I had estimated for our home's
current value minus what we still owed on the mortgage.
Checking on the cause for slow performance on a Microsoft Windows system, I
opened the Task Manager and saw that memory utiilization was high.
Clicking on the Memory column header to order the list of processes
by memory utilization, I saw that the Google Chrome web browser was consuming
most of the memory; there were many Chrome tabs open in the browser.
I could see that the Chrome tab consuming the most memory was one consuming
937.2 MB of memory.
To determine what webpages associated with tabs open in Chrome are
consuming excessive amounts of memory or CPU time, put
chrome://memory in the address bar of the browser. That will
provide information on the amount of memory consumed by each tab open in
the browser as can be seen in this
example. Since the entries aren't ordered by memory utilization, you
will need to scroll through the list to find the tabs consuming the most
memory.
In this case, when I scrolled through the list I saw the tab that was
consuming 937.2 MB of memory had a CNN.com article open in it. When I went
to that tab I saw a "Shockwave Flash has crashed" message at the top of the
tab. When I clicked on "Reload", I saw that memory utilization for that tab
inreased slightly. Moving back to a prior page in the tab with the back arrow
resulted in the Task Manager then showing the highest memory
utilization for a Chrome process to be about half the 937.2 MB shown previously.
I closed the tab to free memory.
If you find that the disk drive space you originally allocated for a
Virtual Machine (VM) under VMWare is now inadequate, the process for
increasing the size of the drive allocated to the VM is fairly simple, but
you will have to delete any existing snapshots before you can increase the
size of the disk drive for the VM, which, though easily done, can take take
some time - I found it took an hour on my MacBook Pro to delete a snapshot for
a Windows XP VM. Once you've deleted existing snapshots, you can then
expand the disk drive size to accomodate your needs. Files with a .vmdk
extension are created to hold the VM's disk drive.
When attempting to download a file via HTTPS from a website using curl, I
saw the error message "SSL3_GET_SERVER_CERTIFICATE:certificate verify failed".
$ curl -o whitelist.txt https://example.com/BLUECOAT/whitelist.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0c
url: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify fail
ed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
When I added the -k option, I was able to download the file
successfully.
But I wanted to know what the issue was with the
public key
certificate and I wanted to get that information from a Bash shell prompt.
You can get the certificate from a website using the command
openssl s_client -showcerts -connect fqdn:443, where
fqdn is the
fully qualified domain name for the website, e.g. example.com. Port
443 is the standard port used for HTTPS. The certificate should be stored as a
.pem file. When I used openssl s_client -showcerts -connect
example.com:443 >example.pem, I saw the message
"verify error:num=19:self signed certificate in certificate chain"
displayed, which revealed the source of the problem.
A self-signed
certificate is one that has been signed by the same entity whose
identity it certifies. For a site using a self-signed certificate, your
traffic to and from that site is protected from eavesdroppers along the path
of the traffic, but the certificate doesn't offer validation that the site
belongs to the entity claiming to own it. But, if you have other reasons to
trust the site or are only concerned about third parties eavesdropping on your
communications with the site, then a self-signed certificate may be adequate.
E.g., the site could be your own site or belong to someone or an entity you
know is in control of the website. Some organizations use self-signed
certificates for internal sites with the expectation that members/employees
will ignore browser warnings for the internal websites, though if people
become accustomed to ignoring such errors there is the danger that they
will also be more prone to ignore such warnings for external sites where
a site's true controlling entity isn't the one they expect.
$ openssl s_client -showcerts -connect example.com:443 >example.pem
depth=1 /C=US/ST=Maryland/L=Greenbelt/O=ACME/OU=EXAMPLE/CN=EXAMPLE CA
verify error:num=19:self signed certificate in certificate chain
verify return:0
read:errno=0
The s_client parameter uses a generic SSL/TLS client to
establish the connection to the server.
s_client This implements a generic SSL/TLS client which can establish
a transparent connection to a remote server speaking SSL/TLS.
It's intended for testing purposes only and provides only
rudimentary interface functionality but internally uses
mostly all functionality of the OpenSSL ssl library.
The certificate is stored in example.pem in this case. You
would need to edit the file to remove everything but the "BEGIN CERTIFICATE"
and "END CERTIFICATE" lines below and the lines that lie between those two
lines.
Or you can use a Bash script
retrieve_certifcate to obtain the certificate; it will stip off the
extraneous lines. The code for the script is shown below:
You can obtain information for the certificate from the PEM file
using the command openssl x509 -text -in example.pem. If
-issuer is appended, then only the issuer information will be
displayed, so I could see that the cerificate was self-signed with the
following command:
$ openssl x509 -noout -in example.pem -issuer
issuer= /C=US/ST=Maryland/L=Greenbelt/O=ACME/OU=EXAMPLE/CN=EXAMPLE CA
If you just want to verify the status of a certificate from the
command line without storing the certificate locally, you can add
the -verify 0 option.
-verify depth - turn on peer certificate verification
E.g.:
$ openssl s_client -showcerts -verify 0 -connect example.com:443
verify depth is 0
CONNECTED(00000003)
depth=1 /C=US/ST=Maryland/L=Greenbelt/O=ACME/OU=EXAMPLE/CN=EXAMPLE CA
verify error:num=19:self signed certificate in certificate chain
verify return:0
88361:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed:/SourceCache/OpenSSL098/OpenSSL098-52.6.1/src/ssl/s3_clnt.c:998:
You can ignore all output from the command but the "verify error" line
with commands like the following:
$ openssl s_client -showcerts -verify 0 -connect example.com:443 2>&1 | grep "verify error"
verify error:num=19:self signed certificate in certificate chain
For another internal website, when I accessed the site in Firefox
with https://cmportal, Firefox reported the following:
This Connection Is Untrusted
You have asked Firefox to connect securely to cmportal,
but we can't confirm that your connection is secure.
Normally, when you try to connect securely, sites will present
trusted identification to prove that you are going to the right
place. However, this site's identity can't be verified.
What Should I Do?
If you usually connect to this site without problems, this error
could mean that someone is trying to impersonate the site, and you
shouldn't continue.
When I viewed the technical details for the certificate, Firefox informed
me that:
code760cmportal uses an invalid security certificate. The
certificate is only valid for the following names: 192.168.160.242,
servera.example.com (Error code: ssl_error_bad_cert_domain)
When I tried downloading the home page for the site with curl, I saw
the message below:
$ curl https://cmportal
curl: (51) SSL peer certificate or SSH remote key was not OK
I was able to get past that error with the -k or
--insecure parameter to curl, though then the page returned
reported I was being denied access to the requested web page due
to invalid credentials.
I downloaded the certificate for that site with openssl; since openssl
would wait for input after verify return:0, I used an
echo "" | to get it to complete.
$ echo "" | openssl s_client -showcerts -connect cmportal:443 >example.pem
depth=2 /C=US/O=Acme/OU=Anvils/OU=Certification Authorities/OU=Anvils Root CA
verify error:num=20:unable to get local issuer certificate
verify return:0
DONE
I removed all the lines before "BEGIN CERTIFICATE" and all those after
"END CERTIFICATE" and then checked the certificate for that .pem file with
the openssl command. That showed me a reference to servera
whereas I had accessed the site using cmportal..
If you've accepted a self-signed certificate, or a certificate
with other issues, in Firefox, you can view the certificate following
the steps noted in Forgetting a certificate
in Firefox.
To check the status of a WiFi connection on a Mac OS X system, you can click
on the wireless networking icon, which is a series of curved lines one
beneath the other, at the top of the screen while holding down the Option
key. You will then see the currently connected WiFi network with a
check mark next to it and details regarding the wireless connection.
The following parameters will be displayed for the wireless connection
currently in use:
PHY Mode, e.g.
802.11n or one of the other wireless standards, such as a, b, g, etc.
Security, e.g., the
wireless security
method employed, or "None" if no security mechanism is emmployed, such
as for a wireless network that is intended to be available for public
access.
Received signal strength indicator (RSSI), which provides a numeric
value indicating the strength of the signal. For Apple OS X systems, the value
will range from -100 as the worst value to 0 as the best. So a value of
-56 as shown above is about at the midpoint for signal strength.
Transmit Rate, which indicates the maximum transmission rate you might
achieve through the wireless access point or router, though you likely
won't be able to actually achieve that maximum rate.
I had a user on a Windows 7 system contact me today to report that he
was unable to check email from his system, but others at his location
were not experiencing problems. He was able to get to websites with his
browser, so there didn't appear to be an issue with Internet access. He
told me that Outlook was displaying a 0x800ccc0f error message, but he
didn't know what version of Outlook was present on his system, so I had
him check in Outlook by going to Help then About Microsoft
Office Outlook. He reported the version number was 14.0. I had
to look up the version name corresponding to that number. The name to
version number correlation is shown below:
Version Name
Version Number
Outlook 97
8.0
Outlook 98
8.5
Outlook 2000
9.0
Outlook XP/2002
10.0
Outlook 2003
11.0
Outlook 2007
12.0
Outlook 2010
14.0
Outlook 2013
15.0
So that version corresponded to Outlook 2013. With the version number,
I was able to provide instructions on how to determine what
POP3 server
was handling his email. It was pop3.firespring.com, so I had him run
a traceroute to it, i.e., tracert pop3.firespring.com. He
told me that was not completing successfully and some of the lines had values
of over 100 ms for the time for a response from the system at that particular
hop, so I at first thought there might be a congestin issue with the network
path to the mail server. If other systems on the same
LAN weren't experiencing the
problem, then perhaps his system was more sensitive to delays, perhaps with
a lower timeout value. But when I tried a traceroute from a Mac system, I
saw the same traceroute issue, but a telnet connection to the POP3 mail
server on the POP3 port, port 110, i.e., telnet pop3.firespring.com 110
resulted in an immediate OK response from the server
which seemed to rule out that hypothesis. So I suggested he contact his
mail service provider which found that he had an unusually large message
on the server. When that message was deleted from the server by the email
server provider his problem went away; apparently Outlook on his system
was timing out when it couldn't download that message in a reasonable
amount of time and then displaying the 0x800ccc0f error message.
The
U.S. Federal Communications Commission (FCC) in conjuction with the
Federal Trade
Commission (FTC) estabilshed a
Do Not Call
List. U.S. residents who don't want to receive calls from telemarketers
can add their phone numbers to the FCC's Do Not Call Registry. Once a number
has been added to the registry, telemarketers are not supposed to call the
number unless one of the following conditions applies:
the calling organization has an established business relationship with you
you have given prior written permission for calls from the caller
the calls are not commercial or do not include unsolicited advertisements
the calls are being made by or on behalf of a tax-exempt non-profit
organizations
I've had our phone numbers on the registry for years. I believe adding the
numbers may have reduced the telemarketing calls, but many telemarketers
ignore the Do Not Call Registry. I have been filing a complaint through the
FTC National Do Not Call Registry
website whenever I receive such calls. I fill out the
Submit a Complaint form after receiving such calls in hopes that if many
others are submitting complaints regarding the same calling number that the
telemarketing company will be fined for its disregard of the regulations
that apply to them.
Lately, though, I've been finding that a large number of such
calls are from "spoofed" numbers. E.g., today I received a robocall with a spiel
that began with "This is Rachel at Card Holder Services". The spiel
ended with a note that this would be my final notice, but I've been
receiving such telemarketing calls from "Rachel at Card Holder Services"
for months, each ending with the reference to a "final notice". The only
option at the end of the spiel was to hit 9 to speak to someone. The
person remarked about my desire to reduce my credit card rate; I said
"No, I want to be removed from the calling list". I asked very politely,
but the person immediately disconnected. I called the number that appeared
as the calling number on my cell phone. After several rings, I received
a recorded message typical of what you would find on someone's personal
voicemail. I figured the telemarketer had spoofed the calling number and
didn't leave a message, but a short while later I received a call from the
person who had that number who was wondering who had called him and why. I
told him about the telemarketing call and said I suspected when I heard
his voicemail that a telemaketer had spoofed his number. He understood
and mentioned he finds telemarketing calls annoying as well. The area
code and first 3 numbers of his number matched those for my cell phone,
likely because the telemarketer by using a number that would seem to be
local to me would be more likely to have someone answer the robocall.
Some people may avoid the plague of telemarketing calls by only answering
numbers they recognize, but I use my cell phone for work and can't tell
by looking at an incoming number whether it is a work-related call or
an annoying telemarketer, since I can't know the number for everyone
who may call me on a work-related matter and those calling on work-related
matters may be in other parts of the country. Nor can one even
reliably assume today that an area code reveals the geographical area
of the caller.
As long as a significant percentage of people buy whatever a telemarketer
is selling, telemarketers won't stop calling no matter how annoying most
people find such calls. But someone would be exceedingly foolish to provide
a credit card number and other personal information to some unknown caller
offering to reduce one's credit card rate in return for providing such
information to the caller. Since I've been getting such calls for months,
I can only assume that a significant number of people do so, though.
When I know the caller is ignoring the Do Not Call Registry, I assume that
the caller's business practices are dubious at best. And certainly when the
calling number has been spoofed, it would be prudent to assume that the caller
is a scammer who may use any credit card number you provide for his own
nefarious ends or sell it to others.
Transmit or display its telephone number or the telephone number of the
seller on whose behalf the telemarketer is calling, and, if possible,
its name or the name and telephone number of the company for which it
is selling products or services.
Display a telephone number that you can call during regular business
hours to ask to no longer be called. This rule applies even to companies
that already have an established business relationship with you.
Under the Truth in Caller ID Act, violators can be subjected to a penalty of
up to $10,000 for each violation of the rules.
So what can you do in such cases? I filed a complaint for the above
mentioned call via the
FTC Do Not Call Registry complaint form. You can also
file a complaint through the FCC's
consumercomplaints.fcc.gov
site by submitting a
Phone Complaint.
For the "Phone Issues" field, you can select "Telemarketing (including
do not call and spoofing". It only takes a few minutes to complete the
complaint forms and I filed a complaint in this case there as well.
The Federal Trade Commission, the nation’s consumer watchdog, has
reached a settlement with a collection of companies it says used that
ploy. And now a special administrator is preparing to mail out checks
to victims.
The total amount available to repay consumers is $700,000. The FTC says
it is mailing out 16,590 checks this week. Each check will be for $42.95
and must be cashed within 60 days.
But that article also notes:
In fact, after the FTC took its first action against “Rachel,”
investigators were frustrated when the calls continued, likely placed
by other sketchy companies.
I'm not looking for a remuneration for the disruption to my work and
wasted time from such calls, but I would like to see companies that ignore
the Do Not Call Registry and use spoofed numbers fined and, hopefully, put out
of business. I hope that others will also file complaints and that an
accumulation of such complaints will lead the FTC or FCC to track down at
least some of these companies and take action against them.
After an issue with my MacBook Pro a few weeks ago that resulted in Microsoft
Entourage 2008 for Mac crashing, I found that searches for email would not
return all pertinent messages. I could search on subject, "from" addresses,
etc. and see results, but not all messages I knew were in the inbox or
other folders. E.g., if I searched by subject for daily logs I
receive, the search would not return any messages between December 31, 2014
and March 31, 2015, though I could see they were in the inbox if I ordered it
by subject.
To correct the problem, I clicked on the Apple icon in the upper,
left-hand corner of the screen, chose System Preferences and then
Spotlight from the Personal group. I confirmed that
Messages & Chats was checked (all entries were checked by
default).
I then clicked on the Privacy button.
Within the Privacy window, I clicked on the plus sign, "+",
and addeded my home directory, e.g., jdoe, to the list of directories that
should not be searched. When you do so, a warning window will open with
a message similar to the one below:
Are you sure you want to prevent Spotlight from searching in "jdoe"?
If you exclude this location from Spotlight searches, the search feature
won't work in some applications.
Clicking on OK will add the directory and its subdirectories
to the exclusion list. After adding the home directory, I clicked on it
to highlight and select it, then clicked on the minus sign, "-" to remove the
directory from the exclusion list and cause a reindexing of that directory.
I then closed the Spotlight window.
I don't know how long the reindexing process took to complete. I didn't
peform any further searches in Entourage until the following day; at that
time searches did return all messages.
While using a MacBook Pro with Firefox ESR 31.6.0, I needed to have it
"forget" a certificate for a website that I had it temporarily accept,
because of an issue with the site's certificate. The process for doing so
is as follows:
In Firefox, click on the icon of three short horizontal bars at the
upper, right-hand corner of the Firefox window, which will give you a menu
where you should select Preferences.
Select Advanced and click on the Certificates tab under
it.
Click on View Certificates.
Click on the Servers tab.
Locate the server for which you wish to delete the certificate. It will
have a lifetime value of "Permanent", if you permanently accepted it or
a value of "Temporary", if you only temporarily accepted it. Click on it
to highlight it, then click on the Delete button.
You will then see a message asking "Are you sure you want to delete these
server exceptions", which will show the server(s) you have selected and
also note "If you delete a server exception, you restore the usual security
checks for that server and require it uses a valid certficate." Click on
OK. If you want to view the certificate before deleting it, you
can click on the View button.
Click on OK to close the Certificate Manager window. You can
then close the Advanced window.
I needed to import a whitelist consisting of a list of fully
qualified domain names from a web page into a Microsoft Excel
spreadsheet. The web page was just a text file with one entry per line,
which made it easy to import data directly from the page in Excel 2013.
The steps to import such data from a web page are as follows:
Click on Data from the menu at the
top of the Excel window.
Select Get External Data and From
Web.
Type the URL for the webpage from which you wish to obtain the data
into the Address bar of the New Web Query window which will
have opened.
The contents of the webpage will be displayed and you can click on
the Import button.
You will then be asked "Where do you want to put the data?" The default
location will be $A$1, i.e., the cell in the first column and first row.
You can change the location or leave it as is and then click on
OK to have the data inserted in the sheet in the Excel workbook
If you need to update the data from the webpage when working in the
spreadsheet later, you can select Refresh All all from the Excel
toolbar and then select Refresh.
The contents of the sheet will then be refreshed with the latest data
from the web page.
I took a friend to a VA hospital today. I took my MacBook Pro laptop
with me and while I was there I used the wireless guest service at
the facility. The performance of the wireless service was awful
today as it was on a previous visit. To determine if the problem
might be attributable to signal strength, I used the airport
command, which is available on OS X systems. The utility is located in
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/.
Help information on the command is available using airport -h.
$ /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -h
Supported arguments:
-c[<arg>] --channel=[<arg>] Set arbitrary channel on the card
-z --disassociate Disassociate from any network
-I --getinfo Print current wireless status, e.g. signal info, BSSID, port type etc.
-s[<arg>] --scan=[<arg>] Perform a wireless broadcast scan.
Will perform a directed scan if the optional <arg> is provided
-x --xml Print info as XML
-P --psk Create PSK from specified pass phrase and SSID.
The following additional arguments must be specified with this command:
--password=<arg> Specify a WPA password
--ssid=<arg> Specify SSID when creating a PSK
-h --help Show this help
To view the status for a wireless connection, use airport -I
or airport --getinfo.
$ /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I
agrCtlRSSI: -67
agrExtRSSI: 0
agrCtlNoise: -86
agrExtNoise: 0
state: running
op mode: station
lastTxRate: 7
maxRate: 144
lastAssocStatus: 0
802.11 auth: open
link auth: none
BSSID: ec:44:76:81:e4:40
SSID: VA Internet
MCS: 0
channel: 11
The signal strength for a connection is the value for
agrCtlRSSI. "RSSI" stands for
received signal strength
indication. The higher the number, the stronger the wireless signal.
The maximum value that may be reported will depend on the wireless
devices being used. Cisco Systems wireless cards have a maximum value of
100 while Wi-Fi chipsets from Atheros will return a value from 0 to 128.
For Apple OS X systems, the value will range from a high of 0 down to
minus 100 (-100). The closer the number is to zero, the stronger the signal
while the closer the number is to negative 100, the weaker the signal
strength.
Since I only wanted to check the signal strength initially, I looked just
for that value. The signal strength seemed to be ok for the waiting room
I was in, though not terrific.
If you go to the membership management page for a
Mailman
mailing list, you will see a checkbox next to every member's address
in a "mod" column and an option to "Set everyone's moderation bit,
including those members not currently visible" near the bottom of
the web page. If you check the mod checkbox next to the member's
address, the list member will not be able to send messages to the
list without the message being approved by the list owner or a
moderator for the list.
When the box is checked for a member, postings from the member are
held and administrators are notified of their existence. They may
then approve or reject postings via the web interface. If unchecked
postings to the list are immediately delivered to list membership.
If a list is to be used only for announcements from the list owner
and designated moderators, then everyone else should have the box checked.
Note: Applies to Mailman 2.1.14 as well as other versions.
The Terminal application in Applications/Utilities allows one
to obtain a shell prompt on a Mac OS X system. You can specify the color
scheme to use when opening a new tab. The default color scheme is "Basic",
i.e., black text on a white background, but you can also choose from
the following:
Grass
Homebrew
Man Page
Novel
Ocean
Pro
Red Sands
Silver Aerogel
Solid Colors
If after making a selection while working in that tab, you
wish to change the colors, you can do so. E.g., if I had selected
the "grass" color scheme, but wanted to change from yellow text on
a green background to black text on a white background, I could so
so by taking the following steps while working in that Terminal tab.
From the Terminal menu, select Show Inspector or hit
Command-I to bring up the Inspector window.
Click on Settings. You will see the current color scheme
highlighted, e.g., "Grass" in this instance.
Click on the new color scheme you wish to use, e.g., "Basic" for black text
on a white background. As soon as you click on a new color scheme, the
foreground and background colors will change.
If you have a Mac OS X system or a Linux system, you can listen for
connections from web browsers on the system by utilizing the
netcat utility,
which you can run by issuing the nc command from a Terminal
window, i.e., a shell prompt. The Terminal application is found in
Applications/Utilities on a Mac OS X system.
You won't get the functionality provided by installing web server
software, such as the
Apache HTTP
Server, but you can use the command for testing or to provide
one page that is visible to thers from their browsers. As an example,
the command below instructs netcat to listen on port 8080 for
connections and display the file index.html when the system is
accessed on that port. If you pick a port above 1024, such as 8080
rather than 80, you don't need root (admin) privileges in order to
have the system listen on the port, but, if you don't use the default port
of 80, you need to specify the port used in the URL, e.g.,
http://www.example.com:80, when you try to connect with a browser.
nc -kl 8080 < index.html
In the above example, two options for netcat, -l
and -k are combined into -kl. Their meaning
and other options can be displayed by issuing the command nc -h.
-k Forces nc to stay listening for another connection after its cur-
rent connection is completed. It is an error to use this option
without the -l option.
-l Used to specify that nc should listen for an incoming connection
rather than initiate a connection to a remote host. It is an
error to use this option in conjunction with the -p, -s, or -z
options. Additionally, any timeouts specified with the -w option
are ignored.
If you are running the command on an OS X system, you may see a
window appear asking whether you wish to allow netcat to receive
incoming connections.
To access the web page from a browser on the system on which you run the
command, or from another system, you will need to specify an appropriate IP
address for the system, which you can get
using the ifconfig -a command, or a fully
qualified domain name for it. If the system is accessible from
the Internet, you can determine what IP address others need to use by
visiting WhatIsMyIP.
E.g., suppose the IP address for the system is 192.168.1.5. That IP
address is
private IP address space, so wouldn't be accessible from the Internet, but
you would substitute whatever IP address others would see for the system, if
you had a system that was accessible from the Internet, e.g., whatever address
WhatIsMyIP would show if you visited
that website using a browser on the system. If you put in
http://192.168.1.5:8080, or substituting whatever port number
you picked instead of 8080, in a web browser, then you should
see the contents of index.html displayed.
If you only need access from a browser on the system itself, then you
can just put in the system's
localhost, aka, local loopback, address, which is 127.0.0.1. E.g., if you
had netcat listen for connections on ort 8080, you could use
http://127.0.0.1:8080.
You can use whatever file name you like, e.g., test123.html will work equally
as well. If you specified that file name, using http://192.168.1.5:8080
would display the contents of that file without it being specified
in the address bar of the browser.
Some browsers may expect the normal status returned by a web server when
a page is accessed, so you may want to include the following line at the top
of index.html or whatever file you specify. Follow the line with a blank line.
HTTP/1.1 200 OK
E.g., below is a sample index.html file that could be used.
If you don't include the "HTTP/1.1 200 OK" line followed by a blank line,
you may see a message such as "The connection was reset" or some other error
message, so I would recommend including it.
Until you hit Control-C at the command prompt window, netcat
will continue to listen for connections and you will see the HTTP commands
issued by browsers. E.g., I might see the following when
http://192.168.1.5:8080 is placed in the address bar of
Firefox.
GET / HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
GET /favicon.ico HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Note: if the system on which you are running the netcat command is running
host-based firewall software, you may need to configure that software to
allow incoming connections on the port you specified in the netcat command
in order for connectivity to work. E.g., see
Opening a firewall port for Firewalld from the command line for
the command to use on a CentOS Linux system running FirewallD.
You can see what services and ports already have firewall rules permitting
access to the ports on a CentOS system using
FirewallD for the
firewall service from a shell prompt with firewall-cmd
--list-services and firewall-cmd --list-ports.
If you wish to permit access on an additional port you can use
the --add-port option. Specify the zone to which
the rule should apply with --zone and specify UDP or TCP
with /protocol after the port number, where
protocol is either udp or tcp.
Note: in the above example the firewall rule is only added temporarily; it
won't persist after a reboot of the system. To make the rule permanent requires
the use of the --permanent option and a restart of the
firewall service with systemctl restart firewalld.service or
firewall-cmd --reload. E.g.:
If you wish to remove access to a port for which you have permitted
connectivity, you can use the --remove-port option. If you
specify a port for which there is no rule permitting access, you will
see a "Warning: NOT_ENABLED" message. E.g.:
By default, Windows Server 2012 doesn't have the audio service enabled, likely
because it won't be needed on many servers, which may not even have
speakers attached to them. You can enable the service by several different
methods. You can run services.msc and start the Windows Audio
service. You can also change the startup type from manual to
automatic to have the service start automatically when the system boots.
Another method for enabling the audio service is to right-click on the
speaker icon in the notification area at the lower, right-hand corner of
the screen and choose Playback devices. You will then see a message
asking whether you wish to enable the audio service. If you choose "Yes",
the service will be enabled and the startup type will be changed to automatic
so the service will start whenever Windows loads.
To open the Device Manager window on Windows 8 from a command prompt,
take the following steps:
Right-click on the Start button in the lower-left corner of the
screen.
If you are logged in under a standard user account and only want to
view device settings, you can choose Command Prompt. If you may
need to change settings and aren't logged in under an account in the
administrators group, choose Command Prompt (Admin). If you
choose the latter, you will be prompted for administrator credentials;
provide a user name and password for an administrator account. When
you choose Command Prompt (Admin), the title of the window
that opens is "Administrator Command Prompt" versus "Command Prompt"
if you open the command prompt window using a standard account.
When the Command Prompt window opens type devmgmt.msc at the
command line and hit Enter. If you are logged on with an account
that does not have administrator privileges and haven't opened an
Administrator Command Prompt window, you will see the message below:
You are logged on as a standard user. You can view device settings in Device
Manager, but you must be logged on as an administrator to make changes.
You can then click on the OK button to view information
for devices listed in the Device Manager. If you've run
devmgmt.msc from an Administrator Command Prompt window you
will have view and modification capabilities.
I wanted to check the temperature of components in a MacBook Pro
laptop running OS X 10.8.5, aka
Mountain Lion,
from the command line. A
Bash script by
jondthompson, which
is a
fork of a script posted by
earlonrails, to check the
battery temperature that can be run from a Terminal window can be found at
GitHub Gist at
battery_temperature.sh. I've also included the code below.
#!/bin/bash
# battery_temperature for mac osx 10.9.2
if [ `uname` == "Darwin" ]; then
if [ "$1" == "-h" ]; then
echo "Usage: $(basename $0 ".sh") [option]"
echo " -l also show Model Name and Processor Name"
echo " -h display this help message"
exit
fi
# -l display Model Name and Processor Name
if [ "$1" == "-l" ]; then
system_profiler SPHardwareDataType | awk '/Model Name/ || /Processor Name/' | sed 's/[^:]*: //' | awk '{ printf $0 " " }'
echo
fi
As with other verions of Microsoft Windows, such as Windows XP, Vista, 7,
8, you may find Microsoft
Windows Server 2012
and the Windows Server 2012 Essentials edition rebooting the system at
inopportune times for updates. You can temporarily delay the shutdown by
issuing the command net stop "windows update" at a command
prompt. Note: you need to open an admin command prompt to do so, which
you can do by moving the mouse pointer to the lower, left-hand corner
of the screen, then right-clicking on the Start button when it
appears and choosing Command Prompt (Admin). But that wil only
postpone the reboot, because Windows will later restart the service on
its own, even if you don't reboot. You can determine if it has restarted
by reissuing the command. You will see a message "The Windows Update
service is not started", if it isn't running.
You can pemanently disable the automatic restart by changing the
group policy for
the system by running gpedit.msc, which you can run by
issuing the command gpedit at a command prompt or by
right-clicking on the Start button, choosing Run and
then typing gpedit.msc and hitting Enter. When
the Local Group Policy Editor window opens, navigate to
Computer Configuration > Administrative Templates >
Windows Components > Windows Update.
In the right pane of the window, you will see "No auto-restart with logged on
users for scheduled automatic updates installations". Change the setting
from "Not Configured" to "Enabled".
I needed to add a Konica Minolta BizHub 363 multifunction device as a
printer on my MacBook Pro laptop, since the default printer was
inaccessible today. So I checked if there was a printer driver for it
already on the laptop in
/Library/Printers/PPDs/Contents/Resources. I saw one there,
so added it from a Terminal window, i.e., a shell prompt.
When adding a printer from the command line on an OS X system, you
can specify the IP address of the printer with the -p
(lowercase "p") argument to the lpadmin command. Other
arguments for the command include the following:
-v "device-uri"
Sets the device-uri attribute of the printer queue. Use the -v
option with the lpinfo(8) command to get a list of supported
device URIs and schemes.
-D "info"
Provides a textual description of the destination.
-L "location"
Provides a textual location of the destination.
-P ppd-file
Specifies a PostScript Printer Description file to use with the
printer. If specified, this option overrides the -i option
(interface script).
The text enclosed in quotes after the -D can be any
description you want to give to the printer and the -L is
any text you wish to use to indicate the location of the printer.
For the -P (uppercase "P") option, I referenced the
Konica Minolta BizHub 363
PostScript Printer Description file I saw on the system.
After you've added a printer, you can verify that it has been added
using the lpstat command. E.g., lptstat -p -d
shows all of the printers added to the system and the default printer for
the system.
-d
Shows the current default destination.
-h server[:port]
Specifies an alternate server.
-l
Shows a long listing of printers, classes, or jobs.
-o [destination(s)]
Shows the jobs queue on the specified destinations. If no destina-
tions are specified all jobs are shown.
-p [printer(s)]
Shows the printers and whether or not they are enabled for print-
ing. If no printers are specified then all printers are listed.
E.g., I can see that the printer I added is enabled. I can also see
that the default printer is at 192.168.234.59, which was inaccessible to
me today because the room it is in was locked.
$ lpstat -p -d
printer 192.168.233.8 is idle. enabled since Thu Apr 16 14:12:21 2015
printer 192.168.234.59 is idle. enabled since Thu Apr 16 13:59:17 2015
Data file sent successfully.
printer _192_168_232_14 disabled since Wed Aug 17 14:52:55 2011 -
/usr/libexec/cups/backend/lpd failed
printer _192_168_235_214 disabled since Tue Dec 27 09:55:45 2011 -
Printer not responding!
printer _192_168_75_20 is idle. enabled since Sat Jun 29 10:21:21 2013
system default destination: 192.168.234.59
To locate the U.S. Federal Employer Identification Number (EIN) issued by
the Internal Revenue Service (IRS) in QuickBooks 2011, open the company
file using a QuickBooks admin account then take the following steps:
Select Company from the menu bar.
Select Company Information. The EIN is
in the Company Identification section.
The information can only be viewed or modified from a QuickBooks admin
account.
On a Unix/Linux system, you can locate files or directories that don't belong
to a valid user account or group on the system with the command
find and the -nouser or -nogroup option.
-nogroup
No group corresponds to file's numeric group ID.
-nouser
No user corresponds to file's numeric user ID.
E.g., to find any such files in the current directory and below it, I can use
find . -nouser
The above example shows that the directory temp and three
files within it don't have a valid owner. Checking them with the ls
command, I see a long sequence of digits listed for the ower and
group instead of an account listed in /etc/passwd or
/etc/group.
# ls -ld temp
drwxr-xr-x. 2 723184451 1286109195 74 Feb 13 17:09 temp
# ls -al temp
total 60
drwxr-xr-x. 2 723184451 1286109195 74 Feb 13 17:09 .
drwx------. 8 jasmith1 jasmith1 4096 Apr 10 22:26 ..
-rw-r--r--. 1 723184451 1286109195 45333 Oct 6 2014 bounced.txt
-rw-r--r--. 1 723184451 1286109195 192 Oct 6 2014 ._Oct14(10-2).pdf
-rw-r--r--. 1 723184451 1286109195 192 Oct 6 2014 ._Oct14.doc
Files or directories with no group listed in /etc/group
corresponding to the numeric group id for the file or directory
can be found with find . -nogroup to search in and beneath
the current directory or find / -nogroup to search starting
at the root directory.
You can use the -o option for "or" to find files and
directories that either don't have a user account associated with the numeric
user id or don't have a group associated with the numeric group id. E.g.,
find . -nogroup -o -nouser.
If you delete an account or group from the system, files or directories
that remain that had that owner or group will then be displayed with the
user id and group id associated with the account or group that was deleted
when you use the ls command.
As does Microsoft Excel,
Apache OpenOffice calc provides an offset function that allows
you to calculate a value based on the contents of a cell that is a specified
distance in rows and columns from a particular cell. The syntax for calc is
as follows:
OFFSET
Returns the value of a cell offset by a certain number of rows and
columns from a given reference point.
Syntax
OFFSET(Reference; Rows; Columns; Height; Width)
Reference is the reference from which the function searches for
the new reference.
Rows is the number of rows by which the reference was corrected
up (negative value) or down.
Columns (optional) is the number of columns by which the
reference was corrected to the left (negative value) or to the right.
Height (optional) is the vertical height for an area that
starts at the new reference position.
Width (optional) is the horizontal width for an area that starts at the new reference position.
Arguments Rows and Columns must not lead to zero or negative
start row or column.
Arguments Height and Width must not lead to zero or negative
count of rows or columns.
In the OpenOffice Calc functions, parameters marked as "optional" can be
left out only when no parameter follows. For example, in a function with
four parameters, where the last two parameters are marked as "optional",
you can leave out parameter 4 or parameters 3 and 4, but you cannot
leave out parameter 3 alone.
Example
=OFFSET(A1;2;2) returns the value in cell C3 (A1 moved by two rows and two columns down). If C3 contains the value 100 this function returns the value 100.
=OFFSET(B2:C3;1;1) returns a reference to B2:C3 moved down by 1 row and
one column to the right (C3:D4).
=OFFSET(B2:C3;-1;-1) returns a reference to B2:C3 moved up by 1 row and
one column to the left (A1:B2).
=OFFSET(B2:C3;0;0;3;4) returns a reference to B2:C3 resized to 3 rows
and 4 columns (B2:E4).
=OFFSET(B2:C3;1;0;3;4) returns a reference to B2:C3 moved down by one
row resized to 3 rows and 4 columns (B2:E4).
=SUM(OFFSET(A1;2;2;5;6)) determines the total of the area that starts in
cell C3 and has a height of 5 rows and a width of 6 columns (area=C3:H7).
On a Linux/Unix system or OS X system, a very quick way to send email
messages and files by email from a shell prompt, aka command line,
is to use the mailx utility.
If you wish to send the contents of a file as the body of a message, you
can use a command like the following one:
$ mailx someone@example.com <report.txt
The above command would send the contents of the file report.txt
to someone@example.com. The contents would be inserted within the body of
the message. In the above case, the message would have no subject. You can
use the -s option to the command to provide a subject for the
message. E.g.:
$ mailx -s "Just a test" someone@example.com <report.txt
The above command would send the same message as the previous one, but
this time with a subject line of "Just a test". If the subject line contains
a space, you must enclose the subject within quotes.
If, instead of sending a file's contents in the body of the message, you
wish to send it as an attchment, you can use the -a option on
Linux/Unix systems, but not on OS X, since the -a option isn't
supported for mailx for that operating system.
$ mailx -s "another test" -a report.txt -b someoneelse@example2.com,jdoe@anothersite.com someone@example.com
A test message with an attachment.
Also sending to two BCC email addresses
EOT
In the above example, the file report.txt is sent as an
attachment to the message with someone@example.com used as the "to" address.
I also sent the message to two additional addresses
as blind carbon copy (BCC) addreses using the -b option. When
using the -b option to send to multiple email addresses,
separate the addresses with a comma. Instead of putting the contents of the
file report.txt in the body, the body in the above example
consists of the two lines starting with "A test message". You can provide
the body of the message by simply typing the mailx command line then hitting
return and then starting typing whatever you want to appear in the body of
the message. When you are finished, hit Ctrl-D, i.e., the
Ctrl and D keys simultaneously. You will then see
EOT appear for the end of text and the message will be transmitted.
If you wish to put email addresses in the carbon copy (CC) field, use
-c, instead of -b. As with the -b option,
separate multiple email addresses with a comma.
If you wish to see if the message has been transmitted from the sending
system, you can use the mailq command. If it hasn't been
transmitted you will see the message still in the queue as in the example
below from a Mac OS X system.
On a Linux/Unix system, you will need to run the mailq command as
root or you can run the command with sudo, if the account you are using
is in the sudoers file.
Though, if the message isn't shown in the queue, there still could
have been a failed delivery attempt. E.g., a short time after issuing
the mailq command above on a OS X system, when I reissued the command I
saw the following indicating the system could not send the email via
mailx.
$ mailq
postqueue: fatal: Queue report unavailable - mail system is down
If you wish to know what updates are available for a Mac OS X system,
you can use the system software update tool, softwareupdate, to do so by
issuing the command sudo softwareupdate -l, if the
account you are logged in under has administrative privileges; if so, enter
the password for that account when prompted. A command line prompt is
available on OS X by running the terminal application found in the
Applications/Utilities folder.
$ sudo softwareupdate -l
Password:
Software Update Tool
Copyright 2002-2010 Apple
2015-04-09 22:51:06.156 softwareupdate[30930:3903] No alternate URLs found for packageId MobileDevice
Software Update found the following new or updated software:
* RemoteDesktopClient-3.8.2 v1.1
Remote Desktop Client Update (3.8.2 v1.1), 7123K [recommended]
* SecUpd2015-004MtLion-1.0
Security Update 2015-004 (1.0), 179583K [recommended] [restart]
* Safari6.2.5MountainLion-6.2.5
Safari (6.2.5), 59025K [recommended]
* AirPortUtility-6.3.1
AirPort Utility (6.3.1), 21104K [recommended]
* iTunesXPatch-12.1.2
iTunes (12.1.2), 101172K [recommended]
* Mac App Store Update-1.0
Mac App Store Update (1.0), 3697K [recommended] [restart]
In the example output above, you can see that installing some of the
updates will require a restart afterwards to have the updates take effect.
If you don't precede the command with sudo, you will see a
message informing you that the command must be run as root.
$ softwareupdate
softwareupdate: Must be run as root
For a list of available options for the command, you can use
sudo softwareupdate -h.
$ sudo softwareupdate -h
Password:
usage: softwareupdate <mode> [<args> ...]
-l | --list List all appropriate updates
-d | --download Download Only
-i | --install Install
<label> ... specific updates
-a | --all all appropriate updates
-r | --recommended only recommended updates
--ignore <label> ... Ignore specific updates
--reset-ignored Clear all ignored updates
--schedule (on | off) Set automatic checking
-v | --verbose Enable verbose output
-h | --help Print this help
You may be able to hibernate a Microsoft Windows 7 computer even if you
don't see the hibernate option listed when you hit Ctrl-Alt-Del
and click on the power button but see only the Shut down and
Sleep options or if you click on the Windows Start
button and then click on the arrow head next to the shut down button and
see only the Sleep option. Try getting a command prompt, instead,
which you can obtain by clicking on the Start button and typing
cmd and hitting enter and then type shutdown /h
or shutdown /h /f if you also want running applications to be
forced to close. Not all PCs may support hibernate mode. You can issue the
command powercfg -availablesleepstates at a command prompt to
see if hibernation mode is available on the system.
C:\>powercfg -availablesleepstates
The following sleep states are available on this system: Standby ( S3 ) Hibernat
e Hybrid Sleep
The following sleep states are not available on this system:
Standby (S1)
The system firmware does not support this standby state.
Standby (S2)
The system firmware does not support this standby state.
Another option for the powercfg command, - hibernate
or -h, enables or disables hibernation. You can see
all available options with powercfg /?.
-HIBERNATE, -H
Enables-Disables the hibernate feature. Hibernate timeout is not
supported on all systems.
Usage: POWERCFG -H <ON|OFF>
POWERCFG -H -Size <PercentSize>
-Size Specifies the desired hiberfile size in percentage of the
total memory. The default size cannot be smaller than 50.
This switch will also enable the hiberfile automatically.
-AVAILABLESLEEPSTATES, -A
Reports the sleep states available on the system
Attempts to report reasons why sleep states are unavailable.
You can determine the version of applications installed on an OS X system
by clicking on the Apple icon in the upper, left-hand corner of the screen
then selecting About This Mac, then More Info, then
System Report, then Software, and then clicking on
Applications beneath Software. You will see a display
similar to the following one:
If you wish to determine the version number of an app from the command line,
if the application supports command line options, you may be able to use
one such as -v or -version to determine the version.
Or you can use the system_profiler SPApplicationsDataType
command to obtain a similar comprehensive list.
E.g., here are a few commands to determine the operating system
version and the version of a few common applications under OS X
from a command prompt, which can be obtained using the Terminal
application.
Determine the OS version with sw_vers.
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.8.5
BuildVersion: 12F45
The Wikipedia OS X
article provides the names given by Apple to each version. E.g., OS X
10.8.5 is called "Mountain Lion".
Determine the version of Java with java -version
$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Determine the version of Firefox with
/Applications/Firefox.app/Contents/MacOS/firefox -v or
-version.
$ /Applications/Firefox.app/Contents/MacOS/firefox -v
Mozilla Firefox 31.5.0
$ /Applications/Firefox.app/Contents/MacOS/firefox -version
Mozilla Firefox 31.5.0
Determine the version of
GNU Image Manipulation Program
(GIMP) with
/Applications/Gimp.app/Contents/MacOS/gimp --version or
/Applications/Gimp.app/Contents/MacOS/gimp -v with the
-v option providing more details.
$ /Applications/Gimp.app/Contents/MacOS/gimp --version
Setting up environment...
Enabling internal python...
Locale black magic...
Launching GIMP...
GNU Image Manipulation Program version 2.8.10
$ /Applications/Gimp.app/Contents/MacOS/gimp -v
Setting up environment...
Enabling internal python...
Locale black magic...
Launching GIMP...
GNU Image Manipulation Program version 2.8.10
git-describe: GIMP_2_8_8-55-g9bb7eb0
using GEGL version 0.2.1 (compiled against version 0.2.1)
using GLib version 2.38.2 (compiled against version 2.38.2)
using GdkPixbuf version 2.30.1 (compiled against version 2.30.1)
using GTK+ version 2.24.22 (compiled against version 2.24.22)
using Pango version 1.36.0 (compiled against version 1.36.0)
using Fontconfig version 2.11.0 (compiled against version 2.11.0)
using Cairo version 1.12.16 (compiled against version 1.12.16)
If you would like to see all of the available command line options for
GIMP, you can use /Applications/Gimp.app/Contents/MacOS/gimp -?,
or -h, or --help, instead of the -?.
You can get the version for many applications at once using the command
system_profiler SPApplicationsDataType.
Telnet can be used from
a command line interface, aka shell prompt, to manually send commands to
an
Simple Mail Transfer Protocol (SMTP) server to test email deliveries.
An SMTP server typically listens on port 25 for incoming connections from
mail clients or other email servers. So you could enter telnet
mail.example.com 25 to connect to that port on a server, e.g.,
mail.example.com in this example, from a command line.
Telnet is available on Linux systems, or can be installed if it is not,
and is also available on Mac OS X systems where you can run the application
by using the Terminal application to obtain a shell prompt. Telnet was
available by default with early versions of Microsoft Windows, but that is
no longer the case. The free and open source
PuTTY program is an
excellent telnet client for Windows, however. To use it to connect to port
25 on an email server, you simply select Telnet as the connection
type and put 25 in the port field.
Once you've connected to port 25 on a mail server, the first command to
enter is either helo or ehlo. Issuing that command
is akin to saying "hello" when you meet someone. The command is usually
followed by the name of the system from which you are connecting, e.g.,
helo me.example.com if you ran the telnet command on a system
with a
fully qualified domain name (FQDN) of me.example.com. But you can follow
the helo or ehlo command with anything, just as
you could say "hello, I'm Paul" when you met someone even if your name was
Peter.
Ehlo is a command that is part of
Extended SMTP (ESMTP),
aka "Enhanced SMTP", which defines protocol extensions for the SMTP
protocol. Ehlo is shorthand for "Extended Hello" and in the
protocol extensions of ESMTP provides a similar role of an introduction.
If the email server to which you are connecting supports the protocol
extensions of ESMTP, it will reply with a list of the keywords it supports
with each preceded by the code 250 as shown below:
$ telnet smtp.mandrillapp.com 25
Trying 54.158.189.65...
Connected to smtp.mandrillapp.com.
Escape character is '^]'.
220 smtp.mandrillapp.com ESMTP
ehlo moonpoint.com
250-ip-10-81-192-73
250-PIPELINING
250-SIZE 26214400
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250 8BITMIME
If the server doesn't support ESMTP, it will return error code 500, instead.
ESMTP client software can then try either HELO, instead, or
issue the QUIT command to terminate the connection to the server.
If the email server doesn't require authentication, you can then issue
commands specifying the "from" and "to" addresses for the email message as
shown below:
$ telnet mail.example.com 25
Trying 192.168.101.222...
Connected to mail.example.com.
Escape character is '^]'.
220 mail.example.com ESMTP Sendmail 8.14.7/8.14.7; Sat, 4 Apr 2015 22:02:39 -0400
mail from: testing@example.com
250 2.1.0 testing@example.com... Sender ok
rcpt to: moonpoint@example.com
250 2.1.5 moonpoint@example.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
This is a test.
.
250 2.0.0 t3520758032350 Message accepted for delivery
quit
221 2.0.0 mail.example.com closing connection
Connection closed by foreign host.
First you issue the command mail from: followed by the
email address that is the "from" address. You then issue the command
rcpt to: followed by the destination email address. The
content of the message is specified by typing data then hitting
Enter and then typing the contents of the email you wish to send.
To terminate the content, type a period by itself as the first character
on a line and then hit Enter. That's all you need to send an email
message and you can then terminate the connetion to the server with the
Quit command.
In the example above, the message you send won't have a subject, because
none was specified. You can specify the subject by entering Subject:
after the Data command. You can also include From:
and To: in the data that follows the data
command. Those don't even have to be the same as what you speficied with the
mail from: and rcpt to commands. If you enter
a From: and To: address after the data
command, those will be what the recipient sees when he or she views the
message. E.g., you could use rcpt to: mary@example.com to
send an email to mary@example.com, but put a bogus address after the
data command, such as From: bogusemail@nonexistent.com
and the email would still be delivered successfully to Mary's mary@example.com
email address, but when she viewed the message it would appear to her it was
sent to bogusemail@nonexistent.com.
$ telnet mail.example.com 25
Trying 192.168.101.222...
Connected to mail.example.com.
Escape character is '^]'.
220 mail.example.com ESMTP Sendmail 8.14.7/8.14.7; Sat, 4 Apr 2015 22:17:16 -0400
mail from: testing@example.com
250 2.1.0 testing@example.com... Sender ok
rcpt to: someone@example.com
250 2.1.5 someone@example.com... Recipient ok
rcpt to: someoneelse@somesite.com
250 2.1.5 someoneelse@somesite.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
From: someone@example.com
To: bogusemail@example.com
Subject: A Test
Just a test.
.
250 2.0.0 t352HGPe003192 Message accepted for delivery
QUIT
221 2.0.0 mail.example.com closing connection
Connection closed by foreign host.
$
In the example above, I skipped the introduction using helo
or ehlo and went straight to rcpt to. I then
entered rcpt to: someone@example.com. When I entered the
rcpt to: someoneelse@somesite.com command I wasn't adding a
second delivery destination for the email but replacing the prior email
recipient; you can just re-enter commands if you've made typos. I then
changed the "from" address that the recipient would see
with From: someone@example.com and also inserted
To: bogusemail@example.com. There's no validation of the
from address at any part of this process, which shows just
how easy it is to spoof the "from" address in an email message, which is
why you should never assume that the "from" address in an email message
reflects the actual sender. Spammers and malware distributors often insert
fake "from" addresses in their email. The email server will check that
the rcpt to: address is a valid email address on the server or
the sender is allowed to "relay" email based on the sender's IP address,
email address, or authentication, but the "to" address seen in a message
when viewed in an email client also doesn't necessarily reflect the one
used in the rcpt to address.
If the rcpt to address isn't a valid email account on the
server and if the server isn't configured to "relay" email to addresses that
exist on other servers, or at least not for the sender of a particular message,
it will respond with a "relaying denied" message.
s telnet example.com 25
Trying 192.168.101.222...
Connected to example.com.
Escape character is '^]'.
220 localhost.localdomain ESMTP Sendmail 8.14.7/8.14.7; Sat, 4 Apr 2015 22:15:24 -0400
ehlo example.com
250-example.com Hello me.somewhere.com [10.0.1.12], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
mail from: testing@example.com
250 2.1.0 testing@example.com... Sender ok
rcpt to: someone@someothersite.com
550 5.7.1 someone@someothersite.com... Relaying denied
The above commands can be used by one email server communicating with
another, e.g., a sender's email server communicating with a recipient's email
server. They can also be used by a client email application, e.g.,
Thunderbird
or Microsoft Outlook. If you are sending email from an email client to an
email server, you may be required to authenticate with that server first
with a userid and password before the server will allow the client to
transmit email through it,though. This is a mechanism to block
spammers from sending email via the server. You can use the AUTH
PLAIN command to transmit those credentials if the email server
supports that command. E.g., in the example below the server supports
that command, since it returns the code 250 followed by "AUTH PLAIN"
after an ehlo command is issued, so I can authenticate
with it by issuing the command AUTH PLAIN followed by the
appropriate credentials.
$ telnet smtp.mandrillapp.com 25
Trying 54.204.65.134...
Connected to smtp.mandrillapp.com.
Escape character is '^]'.
220 smtp.mandrillapp.com ESMTP
ehlo test
250-ip-10-187-29-39
250-PIPELINING
250-SIZE 26214400
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250 8BITMIME
AUTH PLAIN AG1vb25wb22udEBob3RtYW2sLmNvbQBDaTMtY2RfOT0McklOd23OMFEsNGFB
235 2.7.0 Authentication successful
Mail From: testing@example.com
250 2.1.0 Ok
RCPT To: moonpoint@somesite.com
250 2.1.5 Ok
Data
354 End data with <CR><LF>.<CR><LF>
This is a test message.
.
250 2.0.0 Ok: queued as 85761C042C
quit
221 2.0.0 Bye
Connection closed by foreign host.
So what is that long string of characters after the AUTH
PLAIN command. That's actually the userid and password that the
server requires for authentication. It looks like just random letters
and numbers because the userid and password are
base64-encoded. You
can generate the encoded credentials using a Perl command similar to
the one below:
The command is in the format
perl -MMIME::Base64 -e
'print encode_base64("\000user_name\@domain_name\000Password");'.
The user name is preceded by \000, i.e., a backslash followed
by a null character represented by three zeros. If authentication requires
that you enter a userid in the form of userid@domainname, instead
of just username, then you need to precede the "@" with the
backslash escape
character. If you don't do so, Perl will think the "@" represents a
reference to an array and the result you get won't work.
You then add another backslash followed by three zeros and
the password. The encoded data will then be returned. In this case it was
AG1vb25wb2ludEBleGFtcGxlLmNvbQBTb21lUGFzc3dvcmQ= which is
what I would copy and paste after the AUTH PLAIN command when
providing credentials to the server. Note: you can also use online services
to do the base64 encoding, but you would be providing the login
credentials to get the results, so someone else could possibly learn the
userid and password.
You can determine the number of input packets and bytes and output
packets and byes on a network interface and check for errors on a
Mac OS X system using the command netstat -bI interface where interface is a particular network interface
on the system, e.g., en0 or en1 or, alternatively, check all interfaces using
netstat -bi.
-b With the interface display (option -i, as described below), show the number of bytes
in and out.
-d With either interface display (option -i or an interval, as described below), show
the number of dropped packets.
-I interface
Show information about the specified interface; used with a wait interval as
described below. If the -s option is present, show per-interface protocol statis-
tics on the interface for the specified address_family or protocol, or for all pro-
tocol families.
-i Show the state of interfaces which have been auto-configured (interfaces statically
configured into a system, but not located at boot time are not shown). If the -a
options is also present, multicast addresses currently in use are shown for each
Ethernet interface and for each IP interface address. Multicast addresses are shown
on separate lines following the interface address with which they are associated.
If the -s option is present, show per-interface statistics on all interfaces for the
specified address_family or protocol, or for all protocol families.
E.g., using -bI to see information for particular
interfaces:
If you would like comprehensive per-protocol statisitics for TCP,
UDP, and ICMP, you can use netstat -s.
-s Show per-protocol statistics. If this option is repeated, counters with a value of
zero are suppressed.
E.g.:
$ netstat -s
tcp:
29261464 packets sent
17057982 data packets (1342507929 bytes)
25181 data packets (11210523 bytes) retransmitted
0 resends initiated by MTU discovery
10449225 ack-only packets (7938 delayed)
0 URG only packets
508 window probe packets
767946 window update packets
961091 control packets
0 data packets sent after flow control
21404953 packets received
8137595 acks (for 1341998962 bytes)
377994 duplicate acks
0 acks for unsent data
13805067 packets (1284085790 bytes) received in-sequence
14783 completely duplicate packets (8462565 bytes)
69 old duplicate packets
83 packets with some dup. data (50503 bytes duped)
126989 out-of-order packets (165558655 bytes)
108 packets (126046 bytes) of data after window
18 window probes
3196 window update packets
10932 packets received after close
13 bad resets
0 discarded for bad checksums
0 discarded for bad header offset fields
0 discarded because packet too short
697585 connection requests
825 connection accepts
9 bad connection attempts
0 listen queue overflows
265086 connections established (including accepts)
700724 connections closed (including 167300 drops)
4971 connections updated cached RTT on close
4971 connections updated cached RTT variance on close
2672 connections updated cached ssthresh on close
64419 embryonic connections dropped
4638680 segments updated rtt (of 4788660 attempts)
3759189 retransmit timeouts
3379 connections dropped by rexmit timeout
0 connections dropped after retransmitting FIN
1219 persist timeouts
6 connections dropped by persist timeout
261605 keepalive timeouts
200056 keepalive probes sent
55755 connections dropped by keepalive
4620911 correct ACK header predictions
12309843 correct data packet header predictions
15932 SACK recovery episodes
3124 segment rexmits in SACK recovery episodes
3960674 byte rexmits in SACK recovery episodes
31573 SACK options (SACK blocks) received
124018 SACK options (SACK blocks) sent
0 SACK scoreboard overflow
udp:
2731040 datagrams received
0 with incomplete header
0 with bad data length field
0 with bad checksum
127081 dropped due to no socket
692901 broadcast/multicast datagrams dropped due to no socket
1 dropped due to full socket buffers
0 not for hashed pcb
1911057 delivered
18196924 datagrams output
ip:
27677449 total packets received
0 bad header checksums
0 with size smaller than minimum
0 with data size < data length
0 with ip length > max ip packet size
0 with header length < data size
0 with data length < header length
0 with bad options
0 with incorrect version number
443 fragments received
0 fragments dropped (dup or out of space)
0 fragments dropped after timeout
141 packets reassembled ok
24114721 packets for this host
11749 packets for unknown/unsupported protocol
0 packets forwarded (0 packets fast forwarded)
805 packets not forwardable
3549872 packets received for unknown multicast group
0 redirects sent
47854947 packets sent from this host
101 packets sent with fabricated ip header
0 output packets dropped due to no bufs, etc.
11620 output packets discarded due to no route
51 output datagrams fragmented
102 fragments created
0 datagrams that can't be fragmented
0 tunneling packets that can't find gif
130 datagrams with bad address in header
0 packets dropped due to no bufs for control data
icmp:
127081 calls to icmp_error
0 errors not generated 'cuz old message was icmp
Output histogram:
echo reply: 340
destination unreachable: 127081
0 messages with bad code fields
0 messages < minimum length
0 bad checksums
0 messages with bad length
0 multicast echo requests ignored
0 multicast timestamp requests ignored
Input histogram:
echo reply: 639
destination unreachable: 7646
routing redirect: 2468
echo: 340
time exceeded: 136
time stamp: 17
information request: 2
address mask request: 17
UDP: 5
340 message responses generated
ICMP address mask responses are disabled
igmp:
11768 messages received
0 messages received with too few bytes
30 messages received with wrong TTL
0 messages received with bad checksum
11676 V1/V2 membership queries received
29 V3 membership queries received
0 membership queries received with invalid field(s)
11705 general queries received
0 group queries received
0 group-source queries received
0 group-source queries dropped
32 membership reports received
0 membership reports received with invalid field(s)
32 membership reports received for groups to which we belong
0 V3 reports received without Router Alert
11118 membership reports sent
ipsec:
0 inbound packets processed successfully
0 inbound packets violated process security policy
0 inbound packets with no SA available
0 invalid inbound packets
0 inbound packets failed due to insufficient memory
0 inbound packets failed getting SPI
0 inbound packets failed on AH replay check
0 inbound packets failed on ESP replay check
0 inbound packets considered authentic
0 inbound packets failed on authentication
0 outbound packets processed successfully
0 outbound packets violated process security policy
0 outbound packets with no SA available
0 invalid outbound packets
0 outbound packets failed due to insufficient memory
0 outbound packets with no route
ip6:
467000 total packets received
0 with size smaller than minimum
0 with data size < data length
0 with bad options
0 with incorrect version number
94 fragments received
0 fragments dropped (dup or out of space)
1 fragment dropped after timeout
0 fragments that exceeded limit
35 packets reassembled ok
32768 packets for this host
0 packets forwarded
415268 packets not forwardable
0 redirects sent
10803 packets sent from this host
0 packets sent with fabricated ip header
0 output packets dropped due to no bufs, etc.
48739 output packets discarded due to no route
1025 output datagrams fragmented
2050 fragments created
0 datagrams that can't be fragmented
0 packets that violated scope rules
415268 multicast packets which we don't join
Input histogram:
hop by hop: 30801
TCP: 10
UDP: 422348
fragment: 94
ICMP6: 13747
Mbuf statistics:
10 one mbuf
two or more mbuf:
lo0= 9624
457366 one ext mbuf
0 two or more ext mbuf
0 packets whose headers are not continuous
0 tunneling packets that can't find gif
0 packets discarded due to too may headers
0 failures of source address selection
0 forward cache hit
0 forward cache miss
0 packets dropped due to no bufs for control data
icmp6:
0 calls to icmp_error
0 errors not generated because old message was icmp error or so
0 errors not generated because rate limitation
Output histogram:
router solicitation: 443
neighbor solicitation: 171
neighbor advertisement: 133
MLDv2 listener report: 377
0 messages with bad code fields
0 messages < minimum length
0 bad checksums
0 messages with bad length
Input histogram:
multicast listener query: 11644
MLDv1 listener report: 23
neighbor solicitation: 7
neighbor advertisement: 7290
Histogram of error messages to be generated:
0 no route
0 administratively prohibited
0 beyond scope
0 address unreachable
0 port unreachable
0 packet too big
0 time exceed transit
0 time exceed reassembly
0 erroneous header field
0 unrecognized next header
0 unrecognized option
0 redirect
0 unknown
0 message responses generated
0 messages with too many ND options
0 messages with bad ND options
0 bad neighbor solicitation messages
0 bad neighbor advertisement messages
0 bad router solicitation messages
0 bad router advertisement messages
0 bad redirect messages
0 path MTU changes
ipsec6:
0 inbound packets processed successfully
0 inbound packets violated process security policy
0 inbound packets with no SA available
0 invalid inbound packets
0 inbound packets failed due to insufficient memory
0 inbound packets failed getting SPI
0 inbound packets failed on AH replay check
0 inbound packets failed on ESP replay check
0 inbound packets considered authentic
0 inbound packets failed on authentication
0 outbound packets processed successfully
0 outbound packets violated process security policy
0 outbound packets with no SA available
0 invalid outbound packets
0 outbound packets failed due to insufficient memory
0 outbound packets with no route
rip6:
0 messages received
0 checksum calcurations on inbound
0 messages with bad checksum
0 messages dropped due to no socket
0 multicast messages dropped due to no socket
0 messages dropped due to full socket buffers
0 delivered
0 datagrams output
pfkey:
242 requests sent to userland
3872 bytes sent to userland
histogram by message type:
register: 122
flush: 60
x_spdflush: 60
0 messages with invalid length field
0 messages with invalid version field
0 messages with invalid message type field
0 messages too short
0 messages with memory allocation failure
0 messages with duplicate extension
0 messages with invalid extension type
0 messages with invalid sa type
0 messages with invalid address extension
242 requests sent from userland
14064 bytes sent from userland
histogram by message type:
register: 122
flush: 60
x_spdflush: 60
0 messages toward single socket
120 messages toward all sockets
60 messages toward registered sockets
0 messages with memory allocation failure
You can have the display of counters with a value of zero omitted using
the options -ss, instead of -s. E.g.:
$ netstat -ss
tcp:
29262147 packets sent
17058355 data packets (1342573989 bytes)
25181 data packets (11210523 bytes) retransmitted
10449497 ack-only packets (7938 delayed)
508 window probe packets
767946 window update packets
961129 control packets
21405439 packets received
8137921 acks (for 1342065132 bytes)
378012 duplicate acks
13805277 packets (1284149452 bytes) received in-sequence
14785 completely duplicate packets (8462978 bytes)
69 old duplicate packets
83 packets with some dup. data (50503 bytes duped)
126989 out-of-order packets (165558655 bytes)
108 packets (126046 bytes) of data after window
18 window probes
3196 window update packets
10932 packets received after close
13 bad resets
697607 connection requests
825 connection accepts
9 bad connection attempts
265103 connections established (including accepts)
700745 connections closed (including 167300 drops)
4971 connections updated cached RTT on close
4971 connections updated cached RTT variance on close
2672 connections updated cached ssthresh on close
64422 embryonic connections dropped
4638941 segments updated rtt (of 4788924 attempts)
3759239 retransmit timeouts
3379 connections dropped by rexmit timeout
1219 persist timeouts
6 connections dropped by persist timeout
261618 keepalive timeouts
200066 keepalive probes sent
55758 connections dropped by keepalive
4621122 correct ACK header predictions
12309982 correct data packet header predictions
15932 SACK recovery episodes
3124 segment rexmits in SACK recovery episodes
3960674 byte rexmits in SACK recovery episodes
31573 SACK options (SACK blocks) received
124018 SACK options (SACK blocks) sent
udp:
2731110 datagrams received
127082 dropped due to no socket
692942 broadcast/multicast datagrams dropped due to no socket
1 dropped due to full socket buffers
1911085 delivered
18197031 datagrams output
ip:
27678514 total packets received
443 fragments received
141 packets reassembled ok
24115277 packets for this host
11749 packets for unknown/unsupported protocol
805 packets not forwardable
3550381 packets received for unknown multicast group
47855748 packets sent from this host
101 packets sent with fabricated ip header
11620 output packets discarded due to no route
51 output datagrams fragmented
102 fragments created
130 datagrams with bad address in header
icmp:
127082 calls to icmp_error
Output histogram:
echo reply: 340
destination unreachable: 127082
Input histogram:
echo reply: 639
destination unreachable: 7646
routing redirect: 2468
echo: 340
time exceeded: 136
time stamp: 17
information request: 2
address mask request: 17
UDP: 5
340 message responses generated
ICMP address mask responses are disabled
igmp:
11768 messages received
30 messages received with wrong TTL
11676 V1/V2 membership queries received
29 V3 membership queries received
11705 general queries received
32 membership reports received
32 membership reports received for groups to which we belong
11118 membership reports sent
ipsec:
ip6:
467000 total packets received
94 fragments received
1 fragment dropped after timeout
35 packets reassembled ok
32768 packets for this host
415268 packets not forwardable
10803 packets sent from this host
48739 output packets discarded due to no route
1025 output datagrams fragmented
2050 fragments created
415268 multicast packets which we don't join
Input histogram:
hop by hop: 30801
TCP: 10
UDP: 422348
fragment: 94
ICMP6: 13747
Mbuf statistics:
10 one mbuf
two or more mbuf:
lo0= 9624
457366 one ext mbuf
0 two or more ext mbuf
icmp6:
Output histogram:
router solicitation: 443
neighbor solicitation: 171
neighbor advertisement: 133
MLDv2 listener report: 377
Input histogram:
multicast listener query: 11644
MLDv1 listener report: 23
neighbor solicitation: 7
neighbor advertisement: 7290
Histogram of error messages to be generated:
0 no route
0 administratively prohibited
0 beyond scope
0 address unreachable
0 port unreachable
0 packet too big
0 time exceed transit
0 time exceed reassembly
0 erroneous header field
0 unrecognized next header
0 unrecognized option
0 redirect
0 unknown
ipsec6:
rip6:
pfkey:
242 requests sent to userland
3872 bytes sent to userland
histogram by message type:
register: 122
flush: 60
x_spdflush: 60
242 requests sent from userland
14064 bytes sent from userland
histogram by message type:
register: 122
flush: 60
x_spdflush: 60
120 messages toward all sockets
60 messages toward registered sockets
If you wish to capture the contents of the Terminal window on OS X, e.g.,
if you are running the top command and would like to capture a snapshot
of what is in the terminal window, but would like to have that information
in text format, rather than as an image file, which is what you would get if
you used Preview and chose "File" and then "Take Screen Shot", you can use
Command-S from the Terminal window. You will be prompted as to
where you wish to save the file; the default file name is
Terminal Saved Output in the Documents folder for
the account you are logged in under. When you choose "Save", if the file
exists, you will see the message below:
"Terminal Saved Output" already exists.
A file or folder with the same name already exists in the
folder Documents. Replacing it will overwrite its current contents.
Cancel
Replace
If you choose "Replace" the contents of the current Terminal tab will
be written to the file, including the
scrollback buffer, i.e., all of the information displayed in the
window for the current Terminal tab, even what is not shown on the screen
unless you scroll upwards, is recorded to the file.
So, if I wanted to capture the current output of top -o cpu,
I could hit the Command and S keys to save the displayed
information and then edit out anything from the scrollback buffer to have
something like what is shown below.
A MacBook Pro laptop I was using was responding horribly slowly even for
simple tasks. When I ran top to observe the percentage of
CPU usage by process, I found AMPAgent was using a high
percentage of the CPU cycles, going up to 75% at times.
Searching the disk drive for it I found that it was associated with the
Dell KACE software
on the system, which is used for software management on the system.
At
AMPAgent can utilize too much CPU on MAC and Windows on agent (126339) on the Dell Software Support
site, I found Dell noting that the 5.5 version of the agent may experience
issues with high CPU usage. The suggested fix was to upgrade to version 6.0
of the agent, which wasn't an option for me on the laptop, since control of
the KACE servers and the KACE software deployed to client systems was under the
purview of others. But I did verify that the version of the software
was an older version, 5.4.10622; you can get the version number by
using AMPAgent --help.
$ "/Library/Application Support/Dell/KACE/bin/AMPAgent" --help
Usage: /Library/Application Support/Dell/KACE/bin/AMPAgent -h <hostname> [-p <port>] [-d]
-h|-host : hostname of server
-p|-port : port of server
-d|-debug : include debug output in logs
-w|-write : write a default amp.conf file
Example:
/Library/Application Support/Dell/KACE/bin/AMPAgent -h kbox
? 2009-2012 Dell Inc.
KACE Agent AMP client version 5.4.10622
If you wish to "freeze" a top header row in Microsoft® Excel® 2008 for
Mac so that the row remains visible even when you need to scroll down through
many rows, click in cell A2 then click on Window on the menu
bar at the top of the Excel window and select Freeze Panes.
If you later want to revert back to the original behavior where the top
row does not always remain visible when you scroll down through the
spreadsheet, you don't need to click on any particular cell beforehand, but
can select Window and then Unfreeze Panes.
If you wish to have multiple rows remain visible when you scroll through
the spreadsheet, you can click on a row below those you wish to remain visible
and then click on Window and Freeze Panes.
E.g., if you wished the top 5 rows to always be shown even when you've scrolled
far below them, you could click on row 6 and then Window
and Freeze Panes.
If you wished the top row and left-most column to always be visible, you
could click on cell B2 and then Window and Freze
Panes. Then if you scroll down through the spreadsheet, row number
1 will always be visible and if you scroll right, column A will also remain
visible.
Calc does provide a NETWORKDAYS function, but that gives
you the number of work days between two dates. I.e., weekends are excluded.
NETWORKDAYS
Returns the number of workdays between a start date and an end
date. Holidays can be deducted.
Syntax
NETWORKDAYS(StartDate; EndDate; Holidays)
StartDate is the date from when the calculation is carried out. If
the start date is a workday, the day is included in the calculation.
EndDate is the date up until when the calculation is carried
out. If the end date is a workday, the day is included in the calculation.
Holidays is an optional list of holidays. These are non-working
days. Enter a cell range in which the holidays are listed individually.
Example
How many workdays fall between 2001-12-15 and 2002-01-15? The start
date is located in C3 and the end date in D3. Cells F3 to J3 contain the
following Christmas and New Year holidays: "2001-12-24", "2001-12-25",
"2001-12-26", "2001-12-31", "2002-01-01".
=NETWORKDAYS(C3;D3;F3:J3) returns 17 workdays.
However, the DATEDIF function isn't needed to calculate the number of
days between two dates in Calc. Instead, you can simply subtract the two dates.
E.g., if cell B18 contains the date January 1, 2014 and cell B19 contains
the date March 4, 2015, you could place the formula =B19 - B18
in the cell where you want to store the number of days between the two dates.
Unless you change the formatting of the cell to be something other than
a number, you will see 427 as the value in the cell with that formula
given the stated dates. That forumula will produce a result equivalent
to DATEDIF(Start_Date,End_Date,"d") in Excel.
If you are using Google
Sheets, which is Google's free, web-based spreadsheet program, for
a spreadsheet and need to reference a sheet in a workboook that has a
space in the name from another sheet, you need to enclose the name of
the sheet in single quotes. E.g., if I have a sheet named 2014
MoonPoint and need to reference a cell, e.g., D292, in that sheet
from another sheet, I could use '2014 Moonpoint'!D292
to reference the cell from which I need to obtain information. You
will also need to use single quotes to enclose the name if you have
other non-alphanumeric characters in the name, i.e., if you use other
characters besides letters and numbers in the name.
You can reveal a lot of internal
Google Chrome
browser information by putting chrome:// in the Chrome address
bar.
E.g., Google Chrome maintains its own internal DNS cache. You
can display the entries in that cache by putting chrome://dns
in the address bar for Chrome. When you do so, you will see information
similar to that displayed below:
Future startups will prefetch DNS records for 10 hostnames
Host name
How long ago (HH:MM:SS)
Motivation
http://support.moonpoint.com/
244:53:05
n/a
https://accounts.google.com/
244:52:59
n/a
https://chrome.google.com/
244:53:45
n/a
https://clients2.google.com/
244:53:41
n/a
https://clients2.googleusercontent.com/
244:53:37
n/a
https://fonts.googleapis.com/
244:53:03
n/a
https://ssl.gstatic.com/
244:53:03
n/a
https://www.google.com/
244:53:16
n/a
https://www.googleapis.com/
244:53:46
n/a
https://www.gstatic.com/
244:53:03
n/a
You will also see a page load count for web pages.
If you put chrome://downloads/ in the address bar you
will see a list of the recently downloaded files and the URLs that
were used to download them as well as the dates on which the files were
downloaded..
You can view Chrome's history information showing a list of recently
visited pages with the days and times they were visited with
chrome://history/.
You can see information on Chrome's memory utilization, including the
amount of memory used by each Chrome tab using
chrome://memory. That will also reveal the
amount of memory used by other browsers, such as Internet Explorer
and Firefox, that are open on the system. E.g.,
this
is an example from a Windows 7 system where 3 tabs are open within
Chrome, one for Wikipedia, one for Google, i.e., google.com, and one for
chrome://memory itself, which is labeled "About Memory". The
tabs are identified by Tab at the beginning of the name. IE
11 and Firefox 35.0.1 are also open on the system and so information
about their memory utitlization is also displayed.
To set Chrome as the default browser, take the following steps:
Click on the menu bar, which is 3 horizontal bars one beneath the other at the
top right of the Chrome window.
Select Settings.
Click on the Make Google the default
browser.
On a Windows system, you may see a window
asking "How do you want to open this type of link (http)?" which shows the
other browsers on the system that can be used to access websites. Click on
Google Chrome
When you do that, the
HKEY_CLASSES_ROOT\http\shell\open\command is updated as shown
below when the query was run before and after the default browser was
changed from Internet Explorer to Google Chrome on a Windows Server 2012
Essentials system.
When I upgraded Adobe Reader on a user's Microsoft Windows 7 system from
version X (10.1.12) to XI (11.0.10), I saw an Adobe Reader Security
window open with the following prompt when I started Adobe Reader 11
from the administrator account after upgrading the software:
Trusted certificates from your previous version of Adobe Reader were found.
Would you like to import them?
Any certificates that are not imported in this step will not be available in
this version of Adobe Reader.
The address book stores data for certificates used in digital signature and
certificate encryption workflows. During a major upgrade (e.g. 10.x to 11.x),
the product looks for existing address books on each user machine. Prior to
install, you should decide whether to deploy a generic, enterprise address book
or let the existing address book on each machine be imported into the new
product. By default, when end users first launch the product, the application
prompts them to import any discovered address book. The application looks for
existing addressbooks from previous product versions by searching directories
in this order.
(root)\Program Files (x86)\Adobe\Acrobat {current version such as
11.0}\Acrobat\Replicate
I checked to see if any of the files existed from prior versions for the
administrator account, but didn't see any.
C:\>echo %APPDATA%
C:\Users\Administrator\AppData\Roaming
C:\>dir %APPDATA%\Adobe\Acrobat\11.0\addressbook.acrodata
Volume in drive C is OS
Volume Serial Number is 4445-F6ED
Directory of C:\Users\Administrator\AppData\Roaming\Adobe\Acrobat\11.0
File Not Found
C:\>dir %APPDATA%\Adobe\Acrobat\10.0\addressbook.acrodata
Volume in drive C is OS
Volume Serial Number is 4445-F6ED
Directory of C:\Users\Administrator\AppData\Roaming\Adobe\Acrobat\10.0
File Not Found
C:\>dir %APPDATA%\Adobe\Acrobat\9.0\addressbook.acrodata
The system cannot find the file specified.
C:\>
I didn't see any for the administrator's account, so then checked the
user's account, but did not see any there, either.
C:\>dir \Users\Pamela\AppData\Roaming\Adobe\Acrobat\9.0\addressbook.acrodata
Volume in drive C is OS
Volume Serial Number is 4445-F6ED
Directory of C:\Users\Pamela\AppData\Roaming\Adobe\Acrobat\9.0
File Not Found
C:\>dir \Users\Pamela\AppData\Roaming\Adobe\Acrobat\10.0\addressbook.acrodata
Volume in drive C is OS
Volume Serial Number is 4445-F6ED
Directory of C:\Users\Pamela\AppData\Roaming\Adobe\Acrobat\10.0
File Not Found
C:\>dir \Users\Pamela\AppData\Roaming\Adobe\Acrobat\11.0\addressbook.acrodata
The system cannot find the file specified.
C:\>
Since the system had Adobe Acrobat 9.0 on it for creating PDF files as well
as now having Adobe Reader 11.0, I checked the last directory in the list of
possible locations as well, but didn't see anything there, either.
C:\>dir "c:\program files (x86)\Adobe\Acrobat 9.0\Acrobat\Replicate"
Volume in drive C is OS
Volume Serial Number is 4445-F6ED
Directory of c:\program files (x86)\Adobe\Acrobat 9.0\Acrobat
File Not Found
C:\>
So it seems the prompt may appear even if there are no prior certificates
to import. I clicked on the Import button anyway, though.
I connected an external USB drive to an iMac running OS X 10.6.8 for
Time Machine
backups. Two of the three USB ports were occupied by a keyboard and mouse and I
plugged the drive into the only remaining USB port. The user has another
USB drive she sometimes connects to the system temporarily. I wanted a
way to be able to confirm from a terminal window or a shell prompt via
a remote SSH connection that the external drive I set up for Time Machine
backups had been reconnected and contained a recent Time Machine Backup. I found
several scripts for checking the status of Time Machine backups at
"Script
check Time Machine Backups and report how long since last good backup
on Client Daily Report". I chose a
Bash script
posted there by Devin.
I've copied the script here.
From a Terminal window on the iMac I downloaded the Bash script,
check-time-machine-currency, to the user's application directory,
/Users/pam/Applications, with curl and made it executble with
chmod +x. When the script is run, you need to provide a
parameter to it specifying the number of minutes you wish to use for the
recency check; the script reports if a backup has completed within a number of
minutes of the current time using the value you provide for the number of
minutes on the command line. If you run the scipt without providing
that number, an error message will be displayed. Below I specified two days,
i.e., 2,880 minutes (there are 1,440 minutes per day).
Pams-Computer:Applications pam$ curl http://support.moonpoint.com/downloads/comp
uter_languages/bash/check-time-machine-currency -o check-time-machine-currency
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3828 100 3828 0 0 3151 0 0:00:01 0:00:01 --:--:-- 5871
Pams-Computer:Applications pam$ chmod +x check-time-machine-currency
Pams-Computer:Applications pam$ ./check-time-machine-currency
ERROR - You must provide a critical threshold in minutes!
Pams-Computer:Applications pam$ ./check-time-machine-currency 2880
Running on pre-Mavericks.
OK - A Time Machine backup has been taken within the last 2880 minutes. (Sun Mar
1 17:14:33 EST 2015)
Pams-Computer:Applications pam$ date
Sun Mar 1 17:33:15 EST 2015
Pams-Computer:Applications pam$
The script informed me that a backup had been taken within the last 2,880
minutes; the last backup had been made at 17:14:33, i.e., 5:14 PM, which
was less than 20 minutes before I ran the command at 5:33 PM.
With PHP, if you wish to pull code into a PHP file from another file,
you can use include(path/filename);. If you wish to include an HTML file within another HTML file, one way to do it is by using the inline
frame element
IFRAME
. E.g., if I wished to include HTML code from two HTML files and have
the contents of those files appear on the right side of the web page in which
I am including them, I could use the following:
You can control both the height and the width of the iframe. E.g., above
the first iframe element is 2,000 pixels long and the second one is 1,225
pixels long. The width was not specified above, but also could be specified with
width=n where n is the width in pixels. If the
frame height isn't long enough and I wanted a scroll bar to appear, I wouldn't
include scrolling="no". A border will appear around the iframe by
default, but can be removed with style="border: none;". I put
a <br> between the two iframes to have them both appear
on the right one beneath the other.
I wanted to display the output of a program I ran at a shell prompt on
a Linux system with HTML code rather than a screen shot. I wanted the output
to look like the following with the black background on the header line for
the columns to extend across the width of the div I used to
enclose the HTML code for the display of the output:
Linux Network Bandwidth Monitor $Revision: 1.3 $ on localhost.localdomain Interface Received(Kbps) Transmit(Kbps) Total(Kbps)
enp1s4 26.621 960.960 987.581
lo 0.000 0.000 0.000
All 26.621 960.960 987.581
System uptime: 5 days 5 hours 41 minutes and 2 seconds
I started the display with <div><pre> and
ended it with </pre></div>.
When I tried enclosing it within a div tag, the
W3C Markup Validation Service
complained that the div wasn't allowed where I had placed it
within the surrounding pre tags, so I tried the following to
stretch the span to the length of the div:
Linux Network Bandwidth Monitor $Revision: 1.3 $ on localhost.localdomain Interface Received(Kbps) Transmit(Kbps) Total(Kbps)
enp1s4 26.621 960.960 987.581
lo 0.000 0.000 0.000
All 26.621 960.960 987.581
System uptime: 5 days 5 hours 41 minutes and 2 seconds
The reason it didn't work was because by default <span> is an inline
element, which means, it does not have a width or height. So setting the CSS
attributes width and height on <span> will not work. I was able to get
it to work by following the tip at
How to Create a Fixed Width Span in HTML/CSS?:
In order to give a height and width to a span, you have to convert it to
a block level element. Setting the style as “display: inline-block”
will make it a block element with width and height, still displaying as
inline element.
When I used the following CSS, I got the result I wanted:
If you wish to get a list of the installed updates on a Microsoft Windows
system from the command line, you can use the command
wmic qfe list. You will see something like the following as
output:
C:\Users\JDoe>wmic qfe list | more
Caption CSName Description FixC
omments HotFixID InstallDate InstalledBy InstalledOn Name Serv
icePackInEffect Status
http://go.microsoft.com/fwlink/?LinkId=133041 THELMA-LOU Update
KB2849697 NT AUTHORITY\SYSTEM 12/11/2013
http://go.microsoft.com/fwlink/?LinkId=133041 THELMA-LOU Update
KB2849696 NT AUTHORITY\SYSTEM 12/11/2013
http://go.microsoft.com/fwlink/?LinkId=133041 THELMA-LOU Update
KB2841134 NT AUTHORITY\SYSTEM 12/11/2013
http://support.microsoft.com/ THELMA-LOU Update
KB2670838 NT AUTHORITY\SYSTEM 2/27/2013
http://go.microsoft.com/fwlink/?LinkId=161784 THELMA-LOU Update
KB971033 NT AUTHORITY\SYSTEM 11/3/2010
http://support.microsoft.com/?kbid=2305420 THELMA-LOU Security Update
KB2305420 NT AUTHORITY\SYSTEM 12/16/2010
http://support.microsoft.com/?kbid=2393802 THELMA-LOU Security Update
KB2393802 NT AUTHORITY\SYSTEM 2/10/2011
-- More --
Since the list may be fairly long, you may want to redirect the output to a
file. E.g.:
C:\Users\JDoe>wmic qfe list >installed_updates.txt
C:\Users\JDoe>
Another alternative that will provide just the "KB" identifier for each
update is to use systeminfo | find ": KB". The list below
is the output from a Windows 7 Professional system [Version 6.1
(Build 7601: Service Pack 1) on February 27, 2015. As you can see the list is
fairly lengthy.
Though 245 are shown above, when I looked at the output of systeminfo
without filtering the output with the find command I saw
the following line immediately before the list of 245 KB numbers.
A Windows Server 2012 Essentials system can function as a Domain Name
System (DNS) server. If the system is functioning as a DNS server you can
add additional zones that are integrated with Active Directory (AD) or you
can add them as file-based zones as you would on a Unix/Linux DNS server.
The Windows DNS server can be configured to support forward or
reverse
lookup zones. A primary, secondary, or stub zone can be added.
I have a spreadsheet I maintain with Microsoft® Excel® 2008 for Mac
that I use to track work requests. I color code cells in the spreadsheet so
that I can easily identify requests requiring attention or that I need to
keep a closer eye on. I use Excel's conditional formatting capability to
implement the color coding. Excel only provides a maximum of 3 conditions for
conditional formatting, but you can employ formulas using the
logical "and" and "or" connectives to use multiple criteria
for an individual condition to provide additional flexibility with conditional formatting.
E.g., I have an "Expedite" column, column "O", in the spreadsheet
where I place a "Y", if the work request requires an expedited
implementation. The normal implementation time should be within 5
business days, but sometimes requests require a more immediate
implementation. I also have a status column, column "B", that
shows whether a request has been completed or is in some other state,
such as "approved", "pending", "clarification required", etc. In
any case where there is a "Y" in the Expedite column and the value
in the status column doesn't equal "Completed", I want to make the
background of the cell where the "Y" appears in the Expedite column
red, so I can easily spot ones that I need to track closely to
ensure they are completed by the given deadline for the request. I
can easily do that with conditional formatting.
To apply that formatting, I can click on one of the cells in column "O", which
is the "Expedite" column and then click on Format and
select Conditional Formatting and set a formula for the cell.
E.g., if I've selected the first row in the spreadsheet, I can use the
formula below:
=AND(B1<>"Completed",O1="Y")
The formula specifies that if cell B1 doesn't contain the text "Completed"
and cell O1 contains "Y", then the condition is met. I can click on
the Format button and then pick the color I want to apply
to the cell background, in this case I want it colored red. Conditions that
form the logical
conjunction are separated by commas.
You can configure
PuTTY, a free telnet/SSH client program, to port forward connections over
an SSH connection by going to "SSH" then "Tunnels" when configuring a session.
Once you've added instances of port forwarding you can't edit those
instances through the PuTTY configuration window though you can remove them and
add new ones. The information for port forwarding is stored in the registry
under the following key where Session_Name is the name for a stored
session:
E.g., if I saved a session with the name Omega using the tunneling
configuration shown above, the registry entry at
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Omega
for a dynamic SOCKS proxy at port 1080 and forwarding for RDP using local
port 30,089 forwarded to port 3389 on a system with IP address 192.168.0.5
would be as follows:
Value name:
PortForwardings
Value data:
D1080=,L30089=192.168.0.5:3389
I could change the details for the port forwardings by editing the
registry entry. I would see the changed values when I loaded the session.
I could check the information from a command prompt with the following command:
On a Microsoft Windows system, you can enable the
hibernation
feature using the command powercfg /hibernate on or
pwercfg /h on.
When you hibernate a Microsoft Windows system, the contents of memory are
written to a file, hiberfil.sys, in c:\. If a system
has been hibernated, when you power it back on, the contents of
hiberfil.sys are read from disk into memory, so bringing a system
up from hibernate mode will take longer than bringing it back from sleep mode,
which is a power saving mode where the system state is saved to memory.
To check if hibernate mode is available, you can issue the command
powercfg /availablesleepstates at a command prompt. E.g., the
following example shows the output of the command on a Microsoft Windows 8
system on which hibernate mode has been enabled.
C:\>powercfg /availablesleepstates
The following sleep states are available on this system:
Standby (S3)
Hibernate
Hybrid Sleep
Fast Startup
The following sleep states are not available on this system:
Standby (S1)
The system firmware does not support this standby state.
Standby (S2)
The system firmware does not support this standby state.
Standby (Connected)
The system firmware does not support this standby state.
Since hibernate mode is enabled on the system, I can use shutdown /h
at a command prompt on the system to hibernate he system, even though
"hibernate" doesn't appear as one of the options when shutting down the system
through the Windows GUI
The example below shows the output from the
powercfg /availablesleepstates command issued on a Windows Server
2012 Essentials system after hibernate mode was enabled.
C:\>powercfg /availablesleepstates
The following sleep states are available on this system:
Hibernate
Fast Startup
The following sleep states are not available on this system:
Standby (S1)
The system firmware does not support this standby state.
An internal system component has disabled this standby state.
Graphics
Standby (S2)
The system firmware does not support this standby state.
An internal system component has disabled this standby state.
Graphics
Standby (S3)
An internal system component has disabled this standby state.
Graphics
Standby (Connected)
The system firmware does not support this standby state.
Hybrid Sleep
Standby (S3) is not available.
To be able to use Evernote Web Clipper with Chrome, you can take the
following steps.
Inside the Chrome browser, click on the menu bar button, which is
represented by 3 horizontal lines, one beneath the other, in the top,
right-hand corner of the Chrome browser window.
Click on More Tools.
Select Extensions.
Scroll down to you see "Get more extensions" then click on the link for
it.
In the "Search the store" field, type Evernote and hit Enter
.
Click on "Evernote Web Clipper"
At the "Evernote Web Clipper" page, click on the "+ ADD TO CHROME" button
to install the extension.
At the "Confirm New Extension" popup message, click on "Add". You should see
a message stating Evernote has been added to Chrome when the installation
has completed. You can then sign into your Evernote account.
The icon for Evernote, which is an elephant's head, should then appear next
to the Chrome menu bar without having to restart Chrome. You should also see
"Evernote Web Clipper" listed as enabled in the Chrome extensions list. You
can click on "options" for Evernote Web Clipper in the extensions list to
set option values.
Once the extension has been installed You will be able to see the
web pages you have saved in Evernote and add additional pages to your
Evernote archive.
Note: instructions tested with Chrome 40.0
on a Microsoft Windows system, but should apply to other versions and
operating systems as well.
After connecting a new APC 1300 VA model number BX1300G UPS to a Windows
Server 2012 Essentials system, I found that I didn't need to install the UPS
manufacturer's software for monitoring the battery state in the UPS.
Windows automatically detected the UPS and provided information on the
battery charge for the UPS. I had previously enabled hibernation mode on
the server, so I configured the system to hibernate when the battery charge
for the UPS becomes critically low.
I wanted to log DNS queries and responses from all systems using a Windows
Server 2012 DNS server, so that I would have DNS logs available for reference
in the event of issues related to malware, etc. I also wanted to rotate the
log files every night, so that the file size wouldn't grow continually until
it reached the maximum 500 MB size I specified for the log file. Instructions
for doing so for a Windows Server 2012 system are
here. Instructions
for doing so on a Microsoft Windows Small Business Server (SBS) are
at Enabling DNS Logging on a Windows
SBS 2003 Server.
On a system running Small Office Security 3 from
Kaspersky
Lab International Ltd., I was notified that
the antivirus database was not up-to-date. When I had the software attempt
to update the virus definitions, I saw the message "Update Center: Task
failed. Proxy server is not found."
I then realized I had recently configured Internet Explorer on the system
to use a SOCKS proxy server - see
Configuring IE 10 to use an SSH SOCKS Proxy Server - so Kaspersky Small
Office Security 3 must automatically use the system proxy settings,
since I had not altered the configuration of the Kaspersky software,
but be unable to communicate with sites if the system proxy setting is
configured to use a SOCKS proxy rather than an HTTP proxy. I encountered
the same issue with Firefox when it was configured to use the system
proxy settings.
I configured Internet Explorer not to use a proxy server and then clicked
on the update button within Kaspersky Small Office Security 3. It was then
able to update its databases.
If a Windows Server 2012 system is functioning as a DNS server and you need
to change the DNS servers it is using as
forwarders, i.e., the ones to which it is forwarding DNS requests for
external DNS names it can't resolve locally, take the following steps:
Use Ctrl-Esc to get to the Start window where you can click on
Administrative Tools.
Double-click on DNS.
In the right pane of the DNS Manager window, double-click on
Forwarders.
Click on the Edit button to edit the list of forwarders. You can
then add, delete, or modify IP adresses for forwarders.
Click on OK once you have made the needed changes, then click on
OK again. You can then close the DNS Manager window.
A DNS server that is configured to use a forwarder functions as follows:
When the DNS server receives a query, it will attempt to resolve the query by
using the zones that it hosts and by using its cache.
If it can't resolve the query using local data, the DNS server forwards the
query to a DNS server that is designated as a forwarder.
If no forwarders are available, the DNS server will attempt to use its root
hints to resolve the query.
When a DNS server forwards a query to a forwarder, it sends a recursive
query to a DNS server designated as a forwarder rather than an iterative
query that a DNS server sends to another DNS server during standard name
resolution (name resolution that does not involve a forwarder).
If you would like further information on forwarders and conditional
forwarders, see
Understanding Forwarders.
I sorted a spreadsheet created in
Google Sheets on a
column containing a date in order to revert to my original ordering of the
data after sorting on a column containing numbers. The spreadsheet had
a header row and another row at the bottom of the column where I summed
values in the column I had first sorted on. I was hoping merely to undo
the result of the numerical sort and get back to the sorting by date,
but I found that the sort on the date column put the header row at the
bottom of the worksheet along with the monthly sort by numeric value,
i.e., it sorted on those rows as well. I could have avoided including
those in the sort by selecting just the rows I wanted sorted by clicking
on the first row I wanted sorted and then the last one while holding
down the shift key, but I hadn't done that.
I couldn't find any way to unsort the data, i.e., to turn off the sorting
to revert to my original ordering, but Google Sheets does provide
the capability to revert to a prior version of a document. To do so,
click on "File" at the top of the workbook then select "See revision
history", which you can also get to by Ctrl+Alt+Shift+G. You will then
see a "Revision history" list with the times of prior revisions. You can
select one of those to restore a prior version of the workbook. When you
click on the entry for a prior revision, a link will appear beneath it
to "Restore this revision". You will also be shown the workbook as it
looked for the prior revision, so you can decide whether that is the
revision you wish to restore before actually restoring it.
When I tried accessing phpmyadmin on a CentOS 7 server running the Apache
webserver software using http://example.com/phpmyadmin, I received the message
below:
Forbidden
You don't have permission to access /phpmyadmin
on this server.
I got the same error if I tried using the IP address of the system instead
of example.com.
I could see the phpMyAdmin files on the system in /usr/share/phpMyAdmin and the rpm command showed
the package for it was installed on the system.
And when I logged into the web server, opened a browser, and pointed it
to http://localhost/phpmyadmin, I was able to get the phpMyAdmin login prompt.
I could also get to the setup page at http://localhost/phpmyadmin/setup. I
still received the "forbidden" error message if I tried the IP address of
the system in the address bar of the browser while logged into the system,
though.
I encountered the same error message about 4 years ago as noted in
Installing phpMyAdmin on a CentOS System Running Apache. In that
case my notes indicated I edited the phpmyadmin.conf file to add access
from an additional IP address. But when I looked for a phpadmin.conf
file on the current system, there was none to be found. After a little
further investigation, though, I found I should have been looking for
phpMyAdmin.conf rather than phpmyadmin.conf. I.e., I needed to look for a file
with a capital "M" and "A" in the file name.
I then added 192.168 after the instances of the
localhost address,
127.0.0.1, in the Directory /usr/share/phpMyAdmin/ section of
/etc/httpd/conf.d/phpMyAdmin.conf as shown
below, since the other systems on the LAN
had addresses in the 192.168.xxx.xxx range, so I could access
phpMyAdmin from any other system on the LAN.
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1 192.168
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1 192.168
Allow from ::1
</IfModule>
</Directory>
I then restarted the Apache web server software by running apachectl
restart from the root account. I was then able to access phpMyAdmin
using the internal IP address of the system, e.g.,
http://192.168.0.5/phpmyadmin, though http://example.com/phpmyadmin didn't work
because even though I was trying to access the server from a system on
the same LAN by using the
fully
qualified domain name (FQDN), I was then accessing the system by the
external address on the outside of the firewall/router it sits behind. But,
in this case, accessing it by IP address was sufficient.
On newer versions of the Microsoft Windows operating system, such as
Windows 2008 and Server 2012, the at command that could be
used on earlier versions of Windows to schedule the execution of batch jobs
at a specified interval has been deprecated. The command has been replaced
with schtasks. You can use schtasks to specify how frequently
a batch job should be run, the account it should be run from, the time
the task should run, an end time, end date, etc.
C:\Users\JDoe>schtasks /?
SCHTASKS /parameter [arguments]
Description:
Enables an administrator to create, delete, query, change, run and
end scheduled tasks on a local or remote system.
Parameter List:
/Create Creates a new scheduled task.
/Delete Deletes the scheduled task(s).
/Query Displays all scheduled tasks.
/Change Changes the properties of scheduled task.
/Run Runs the scheduled task on demand.
/End Stops the currently running scheduled task.
/ShowSid Shows the security identifier corresponding to a scheduled t
ask name.
/? Displays this help message.
Examples:
SCHTASKS
SCHTASKS /?
SCHTASKS /Run /?
SCHTASKS /End /?
SCHTASKS /Create /?
SCHTASKS /Delete /?
SCHTASKS /Query /?
SCHTASKS /Change /?
SCHTASKS /ShowSid /?
A SOCKS proxy can be set up from a system using an encrypted tunnel
established via an SSH connection to an SSH server, e.g., see
Creating a Socks Proxy Server
with SSH. On a Microsoft Windows system, the free
PuTTY telnet
and SSH client software can be used to set up such a connection. After
configuring PuTTY to establish a SOCKS proxy via its connection to the SSH
server, any browser that supports SOCKS proxies, such as Internet Explorer,
Chrome, Firefox, etc., can be configured to route its traffic to web servers
via the SOCKS proxy.
For a file that is an image, you can determine the type of image from
a shell prompt, e.g., from a Terminal window, on an OS X system using
the file command:
For PNG images, the command will also reveal the size of the image, e.g., for
the example above the image is 18 pixels wide by 18 pixels high. The first
number is the width and the second number is the height, though in this case
the height equals the width.
The command can be useful if a file has a missing extension or if you need
to verify that the file extension matches the actual image type.
The command determines the type of image stored in a file from a
"magic number"
stored near the beginning of the file. For PNG images, the
PNG file header, which is the first 8 bytes
of the file, will contain ASCII 89 P N G cr nl sub nl. CR
represents a carriage return (octal 15, decimal 13, hexadecimal 0D) and NL
represents a newline, aka line feed, character (decimal 10, octal
12, hexadecimal 0A). ASCII SUB is octal 032, decimal 26 and hexadecimal
1A. The first character before "PNG" is octal 211, which is decimal 137 and
hexadecimal 89.
You can see the characters at the beginning of the file using the
od utility, which is a filter which displays the specified files,
or standard input if no files are specified, in a specified format. Supported
formats include octal, decimal, hexadecimal, or
ASCII. E.g, to display the
first 8 bytes of a file in ASCII format, you can use the -a option
to display the data in ASCII format and the -N option to display
only the first 8 bytes.
$ od -a -N 8 menu_button
0000000 89 P N G cr nl sub nl
0000010
The 89 is the hexadecimal number for the first byte; that
is 137 in decimal and 211 in octal. The first 8 bytes in octal
format are shown below:
For GIF files,
file displays the size of the image with the first number, 165 in
the example below, being the width and the second number, 57, being
the height.
$ file home.gif
home.gif: GIF image data, version 89a, 165 x 57
File can determine that a file is a GIF file because for a GIF file the
first 6 characters of the file will be ASCII GIF87a.
$ od -a -N 6 home.gif
0000000 G I F 8 9 a
0000006
You can display both the hexadecimal and ASCII characters with the
hexdump command using the -C option.
When I tried to install Norton Ghost 7.5 on a Windows Small Business Server
(SBS) 2003 server, I received the message below:
Windows Installer
The Windows Installer Service could not be accessed.
This can occur if you are running Windows in safe
mode, or if the Windows Installer is not correctly
installed. Contact your support personnel for assistance.
[ OK ]
I downloaded
Windows Installer 3.1 Redistributable (v2) From Microsoft's Download Center
and installed it, but I got the same results when I tried to reinstall
Symantec Ghost 7.5.
The Windows Installer files that are on your hard disk are damaged or are
missing.
You install or remove a program that uses the Windows Installer Microsoft
Software Installation (MSI) package file (.msi). For example, this may occur
when you try to install Microsoft Office on your computer.
I was starting the Symantec Gost 7.5 installation process from a CD with an
autorun file, but I noticed there was a file, Symantec Ghost.msi in
an Install directory on the CD. The installation process likely uses
the .msi
file for the installation.
Microsoft's article recommends steps to resolve the problem. You should first
determine the location of the file msiexec.exe on your system. The file
will be in the Windows system32 directory, which is usually either
C:\Windows\system32 or C:\WINNT\system32 for versions of
Windows after Windows 98. For Windows 98 the file is usually in
C:\Windows\System. You can search for
the file or you can determine the
Windows directory by obtaining a command prompt and checking the value of
the %WINDIR% environment variable with echo %WINDIR%,
which will tell you which directory is the Windows directory on a system.
You can then verify that msiexec.exe is in that directory.
C:\>dir %WINDIR%\system32\msiexec.exe
Volume in drive C has no label.
Volume Serial Number is E88C-7773
Directory of C:\Windows\system32
03/21/2005 02:00 PM 78,848 msiexec.exe
1 File(s) 78,848 bytes
You then need to check the registry to make sure that
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSIServer\ImagePath
has a value that corresponds to the actual location of the
msiexec.exe file on the system. You can do so using the
regedit command or using a reg query command from a command
prompt.
C:\>reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSIServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSIServer
Description REG_SZ Adds, modifies, and removes applications provided a
s a Windows Installer (*.msi) package. If this service is disabled, any services
that explicitly depend on it will fail to start.
Type REG_DWORD 0x20
Start REG_DWORD 0x3
ErrorControl REG_DWORD 0x1
ImagePath REG_EXPAND_SZ C:\Windows\system32\msiexec.exe /V
DisplayName REG_SZ Windows Installer
DependOnService REG_MULTI_SZ RpcSs
DependOnGroup REG_MULTI_SZ
ObjectName REG_SZ LocalSystem
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSIServer\Security
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSIServer\Enum
If the msiexec.exe file is in C:\Windows\System32, you should
see C:\Windows\System32\Msiexec.exe /V as the value in the key.
In the case of the system I was working on, the file location matched the
registry value.
If the values don't match, you will need to enter the correct path in the
registry or put the file in the directory listed in the registry. Once the
values match, you will need to reregister the msiexec.exe file.
To do so, restart the computer in Safe Mode (hit F8
to get the menu of boot options before Windows starts when you reboot).
Once you've logged into an administrator account on the system in Safe Mode,
you will need to use the following procedure:
Click Start, click Run, type the following line, and then
click OK:
msiexec /regserver
Note: For 64-bit operating systems, you also need to reregister the 64-bit MSI
installer. To do this, click Start, click Run, type the
following line, and then click OK:
Drive:\Windows\Syswow64\Msiexec /regserver
On 64-bit editions of a Windows operating system, 32-bit binaries are located
in %systemroot%\SysWow64 folder. 64-bit binaries are located in the
%systemroot%\System32 folder.
In my case, I was then able to successfully reinstall Symantec Ghost 7.5
on the system, though I did receive another error at the end of the process
that was not associated with the previous installer problem. The error I
received at the end is shown below.
Symantec Ghost Configuration Server
08001 [Sybase[[ODBC driver][Adaptive Server Anywhere]Unable to connect to
database server: Database server not running
To hide an account from the Microsoft Windows 7 welcome screen, take
the following steps:
Click on the Start button.
Type regedit in the "Search programs and files" field and hit
Enter.
When prompted if you want to allow the program to make change to the system,
choose "yes".
Navigate to
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\
Right-click on Winlogon and choose "New" then "Key" and put
SpecialAccounts for the key name.
Right-click on SpecialAccounts and choose "New" then "Key" and put
Userlist for the key name.
Right-click on UserList on the left side of the window and select
New and then DWORD (32-bit) Value.
You'll see the new entry in the right pane of the window, rename
this value, which by default will be labelled "New Value #1", to
the name of the user account you want hidden. It should be exactly
how it is listed on the welcome screen you see when the system
starts. Leave the value at 0.
You can then close the registry editor by clicking on File then
Exit.
Now when you logoff, you shouldn't see the hidden account on the
welcome screen. If you still see it, reboot.
Note: unlike with hidden accounts under Windows XP, you can't log into
a hidden account by hitting the Ctrl, Alt, and Del keys.
If you want to determine the number of entries in a spreadsheet that have
a date value that is greater than or equal to a particular date, you can
use the COUNTIF function in Excel. E.g., if you had dates
in column G rows 4 through 959 and wished to know the number of rows
with a date that was greater than or equal to October 15, 2014, you could
use the formula below, assuming you are using the common U.S. style of date
in the form mm/dd/yyyy.
=COUNTIF(G4:G959,">=10/15/2014")
Suppose, instead, that you had a date in F970 and you wished to use
whatever date you had in that cell for the date comparision operation.
You could then use the following formula:
=COUNTIF(G4:G959,">="&F970)
The ampersand before the F970 concatenates the value in that cell to
the string >=, so that if cell F970 contains the date value
10/15/2014, COUNTIF will only count cells containing a date
greater than or equal to that date.
On a MacBook Pro running OS X 10.8.5, the paste operation stopped working.
I didn't receive any error messages whenever I tried to copy text in
an application, but if I then tried to paste anything into that application
or any other, nothing would be pasted. Copying and pasting didn't work with
Command-C and Command-V nor by selecting the copy and
paste functions from applications' menus. Nor did cutting with Command-X
and then pasting with Command-V work.
When I went to Edit and selected Show Clipboard within the
Finder, I saw "Clipboard contents: none".
The solution I found after some online searching was to kill the PasteBoard,
aka clipboard, process and restart it. That allowed me to use copy and
paste without rebooting the computer.
To be able to use copy and paste after restarting the pboard process, you
will need to close and reopen any application in which you need to copy and
paste data after you restart the process. You won't see data that is copied
appear in the clipboard shown by the Finder until you restart the Finder,
which you can do by clicking on the Apple icon at the top left of your screen
and then selecting Force Quit, then clicking on Finder
within the Force Quit Applications window to select it, and then
clicking on the Relaunch button. After you do that, you can click
on Edit and Show Clipboard within the Finder and see what
was previously copied into the clipboard before restarting the Finder.
If you have an application open that was open before you restarted the
PasteBoard, if you try copying something from it, it won't appear in the
clipboard. You will have to restart that application to copy anything from
it.
To manage cookies in Google Chrome, take the following steps:
Click on the
Chrome menu bar, which is 3 short, horizontal lines, one below the
other at the top of the Chrome browser window.
Click on Settings.
Note: you can also get to the settings window by putting
chrome://settings/ in the Chrome address bar.
Scroll down until you see "Show advanced settings", then
click on "Show advanced settings".
In the Privacy section, click on the Content settings button.
At the Content settings window, click on the All cookies and
site data button.
Note: you can also get to this window by putting
chrome://settings/content in the browser address bar.
You will now see a Cookies and site data window showing you a
list of all the cookies Chrome has stored.
If you only want to check on cookies for a particular site, you can put
the site name in the "Search cookies" field next to the Remove all
button to display just the cookies associated with that domain name as shown
below where only the cookies pertaining to arin.net are displayed.
You dont' need to type in a complete domain name. E.g., if you wanted
to search for any cookies associated with a website with a domain name
beginning with "mysite", you could simply enter mysite for the
search criteria. If you wanted to delete the cookies for that site, with
only the relevant cookies for that site displayed by the search criteria,
you could click on Remove all to get rid of just the cookies for
that site.
Note: a shortcut to get to this list is to put chrome://settings/cookies
in the Chrome address bat.
The command shutdown /h can be used to hibernate a Microsoft
Windows system. If you run the command on a Windows Server 2012 Essentials
system which hasn't had hibernation mode enabled, you will see the following
message:
PS C:\Users\User> shutdown /h
Hibernation is not enabled on this system. You must enable hibernation in order to use the -h option.
To enable hibernation, you can issue the command powercfg
/hibernate on from a PowerShell prompt. However, you may see the
message below when you enter the command:
PS C:\Users\User> powercfg /hibernate on
An unexpected error condition has occurred. Unable to perform operation. You may not have permission to perform this o
peration.
To enable hibernation, right-click on the PowerShell icon, which looks like
a button with a ">_" in it, then choose "Run as Administrator" and then issue
the powercfg command.
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.
PS C:\Windows\system32> powercfg /hibernate on
PS C:\Windows\system32>
Once you've done that, you can hibernate the system with shutdown
/h.
To open a command prompt with administrator access under Windows 7
you can take the following steps:
Click on the Windows Start button.
In the "Search programs and files" field type cmd.
Right-click on cmd.exe and choose "Run as administrator". Provide
a userid and password for an account in the administrators group when
prompted.
Alternatively, you can open a command prompt with administrator
access from a command prompt you've opened from a standard user account
by typing runas /user:administrator cmd.exe. Or you can
substitute the name of some other account with administrator access
instead of "administrator". Enter the password for the account
when prompted to provide it.
The Google Chrome menu bar, which consists of three horizontal bars, one
beneath the other, in the upper, right-hand corner of a Chrome window will
change color if Chrome is not up-to-date. Normally the 3 lines are black, but
they will change to green, orange, or red if the version of the Chrome
browser that you are using is no longer current. E.g., in the screen
shot below taken on a Mac OS X system running Chrome 35.0, the bars
have turned red. The menubar color changes apply to Chrome on other
operating sytems as well. Clicking on the menubar shows a list of menu
options, but also a "Chrome is Out of Date" message.
The menu bar color shows how long an update has been available:
Color
How long an update has been available
2 days
4 days
7 or more days
To configure Chrome to update automatically on a Mac OS X system, you can
select "About Google Chrome" from the menu that is accessible from the menu
bar then click on the "Set Up Automatic Updates for All Users" button.
If you want to search a
Windows event log for occurrences of a particular eventid, you can use the
Windows
PowerShell cmdlet get-eventlog. E.g., to search the system
event log, you would include that as a parameter after
get-eventlog. If I wanted to search that log for all instances
of the event id 5, I could use the command below:
c:\>powershell
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
PS c:\> get-eventlog "system" | where-object {$_.EventID -eq 5}
Index Time EntryType Source InstanceID Message
----- ---- --------- ------ ---------- -------
798 Nov 29 20:27 Error Microsoft-Windows... 5 The des...
PS C:\>
Sometimes there may be many occurences of a particular eventid in a log
file. You can limit the display to those before or after a particular date
using -before or -after as shown below for a
search of the application event log:
PS C:\> get-eventlog -LogName "application" | where-object {$_.EventID -eq 753}
Index Time EntryType Source InstanceID Message
----- ---- --------- ------ ---------- -------
6239 Jan 25 22:29 Information Microsoft-Windows... 753 The Blo...
2108 Dec 27 21:17 Information Microsoft-Windows... 753 The Blo...
2099 Dec 27 21:00 Information Microsoft-Windows... 753 The Blo...
1380 Nov 29 22:18 Information Microsoft-Windows... 753 The Blo...
1359 Nov 29 22:05 Information Microsoft-Windows... 753 The Blo...
1278 Nov 29 20:37 Information Microsoft-Windows... 753 The Blo...
PS C:\> get-eventlog -LogName "application" -before 2015-01-01 | where-object {$
_.EventID -eq 753}
Index Time EntryType Source InstanceID Message
----- ---- --------- ------ ---------- -------
2108 Dec 27 21:17 Information Microsoft-Windows... 753 The Blo...
2099 Dec 27 21:00 Information Microsoft-Windows... 753 The Blo...
1380 Nov 29 22:18 Information Microsoft-Windows... 753 The Blo...
1359 Nov 29 22:05 Information Microsoft-Windows... 753 The Blo...
1278 Nov 29 20:37 Information Microsoft-Windows... 753 The Blo...
PS C:\> get-eventlog -LogName "application" -after 2015-01-01 | where-object {$_
.EventID -eq 753}
Index Time EntryType Source InstanceID Message
----- ---- --------- ------ ---------- -------
6239 Jan 25 22:29 Information Microsoft-Windows... 753 The Blo...
PS C:\>
If you only want to see error events in a log, e.g. errors in the application
log, you could use a command such as the one shown below:
PS C:\> get-eventlog -LogName "application" -entrytype error
Index Time EntryType Source InstanceID Message
----- ---- --------- ------ ---------- -------
6599 Jan 31 20:19 Error Microsoft-Windows... 2005 There w...
6596 Jan 31 20:19 Error Microsoft-Windows... 2005 There w...
6455 Jan 28 22:38 Error Microsoft-Windows... 2006 There w...
6427 Jan 28 02:13 Error Microsoft-Windows... 513 Cryptog...
6383 Jan 27 21:55 Error VSS 8194 Volume ...
6340 Jan 26 19:31 Error VSS 8194 Volume ...
6240 Jan 25 22:29 Error Microsoft-Windows... 513 Cryptog...
You can get help on using the get-eventlog cmdlet by typing
help get-eventlog at a PowerShell prompt.
PS C:\> help get-eventlog
NAME
Get-EventLog
SYNTAX
Get-EventLog [-LogName] <string> [[-InstanceId] <long[]>] [-ComputerName
<string[]>] [-Newest <int>] [-After <datetime>] [-Before <datetime>]
[-UserName <string[]>] [-Index <int[]>] [-EntryType <string[]> {Error |
Information | FailureAudit | SuccessAudit | Warning}] [-Source <string[]>]
[-Message <string>] [-AsBaseObject] [<CommonParameters>]
Get-EventLog [-ComputerName <string[]>] [-List] [-AsString]
[<CommonParameters>]
ALIASES
None
REMARKS
Get-Help cannot find the Help files for this cmdlet on this computer. It
is displaying only partial help.
-- To download and install Help files for the module that includes
this cmdlet, use Update-Help.
-- To view the Help topic for this cmdlet online, type: "Get-Help
Get-EventLog -Online" or
go to http://go.microsoft.com/fwlink/?LinkID=113314.
PS C:\>
By default, when you open a command prompt window on a Microsoft Windows
system, you get a window with a black background and white text. If those
color choices are not the ones you would prefer, you can change them with
the color command.
C:\Windows\system32>color /?
Sets the default console foreground and background colors.
COLOR [attr]
attr Specifies color attribute of console output
Color attributes are specified by TWO hex digits -- the first
corresponds to the background; the second the foreground. Each digit
can be any of the following values:
0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
If no argument is given, this command restores the color to what it was
when CMD.EXE started. This value either comes from the current console
window, the /T command line switch or from the DefaultColor registry
value.
The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute
the COLOR command with a foreground and background color that are the
same.
Example: "COLOR fc" produces light red on bright white
C:\Windows\system32>
If you would prefer black text on a white background, you can use
color 70, though the background color looks like a light
gray on the systems on which I've tried that color combination, rather than
white.
The command color f0, which is for black on bright white,
does provide a white background with black text, though, on those same
systems.
If you don't like a color combination you've obtained from the command,
you can set the colors back to the default white text on a black background
by entering the color command with no options.
If you want to make the change apply to every command prompt window
you open for the currently logged on account, you can use the windows
regedit command to edit the registry key
HKEY_CURRENT_USER\Software\Microsoft\Command Processor and change
the value for DefaultColor from its default value of 0 to the
hexadecimal value f0, which is decimal 240.
Once you've changed the registry value, every new command prompt
window you open from that time onwards will use the new settings.
You can check on the registry value from a command prompt with the
command reg query "HKEY_CURRENT_USER\Software\Microsoft\Command
Processor" /v DefaultColor.
You can set the value from the command prompt with a command similar to
the following one:
C:\Users\User>reg add "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /
v DefaultColor /t REG_DWORD /d 240 /f
The operation completed successfully.
C:\Users\User>
The data to be used is specified with the /d option. In the
above case, I am using the decimal equivalent, 240, to the hexadecimal number
F0 and adding the /f option, so that I won't be prompted
as to whether I wish to overwrite the existing value.
I maintain a website for an association with a little over 2,500 members
that sends a monthly newsletter to members. The newsletter is sent
by the U.S. Postal Service and email and I also convert the Microsoft
Word document the newsletter editor sends me to HTML and post it to the
association's website, which I've been maintaining for years now. The
newsletter editor uses Microsoft Word to produce the newsletter. I tried
Microsoft Word's "Save as Web Page" feature initially, but parts of the
HTML code it produced didn't display properly on non-Microsoft Windows
systems, sometimes because they didn't have the same fonts as those
present on Microsoft Windows systems. And the code looked messy when
I would edit the HTML version of the newsletter produced by Microsoft
Word. Eventually, I decided it was actually quicker to just copy the
text from Word, paste it into the Vi text editor and add the appropriate
HTML formatting tags manually to get the newsletter to look close to
the original Word version, but in a format that would display similarly
across browsers and operating systems.
The copying, pasting, and editing process can take an hour or more, so when
I came across the Word to Clean HTML
site, which provides a free tool to convert documents produced by Microsoft
Word and similar office software to HTML, I pasted the newsletter into
its online form for conversion. The tool "strips out invalid or
proprietary tags leaving clean HTML behind for use in web pages and ebooks",
I hoped it might save me a fair portion of the time I normally spend each
month on the manual conversion process and allow me to get the newsletter
posted more promptly after I receive it. So, I copied the contents of
the newsletter with command-C (I'm normally handling it on a Mac) and
then pasted it into the form on the site's webpage. I checked a couple of
the options that weren't checked by default: replace non-ascii with HTML
entities and replace smart quotes with ascci equivalents. I then clicked
on the convert to clean html button.
The HTML code produced by the tool was much cleaner than that produced
by Word and gave me code that looked the same when viewed from browsers
on different operating systems. I wouldn't have needed to do any editing
to have the newsletter display appropriately, but I noticed that for an
unordered list that at the end of each <li> entry there
were extraneous <strong><u></u></strong>
tags, i.e. there wasn't any text enclosed by the tags, which weren't needed.
But that wouldn't have affected members' view of the newsletter. I removed
it though, and made the source code a little more readable by putting in
some blank lines between some of the items. But that wasn't really needed
and by using the free online tool I should, hopefully, be able to reduce the
process of posting the newsletter to about 15 minutes and get the newsletter
posted shortly after I receive it now, so I'm thankful to
Olly Cope, a freelance python web developer,
for making it freely available to others. The tool was written in Python
using the lxml library.
If you have a maximum storage limit on a Microsoft Exchange server and
need to reduce the amount of storage you are using and have Entourage 2008
as your email client, you can check the overall space consumed by right-clicking
on the icon representing the Exchange server that appears above your Inbox
on the server, then select Folder Properties then Storage.
You will then see a figure for "Total size (with subfolders)". One way
to reduce the amount of storage space consumed is to reduce the size of the
Calendar subfolder by removing outdated entries. You can see its
size in the list of all subfolders or you can right-click on
Calendar in the left pane of the Entourage window and
choose Folder Properties then Storage.
From the left pane of the Entourage window, you can select old
entries by clicking on Calendar then selecting Edit
from the menu bar at the top of the window and then selecting
Advanced Search. For "Item Contains", select "End Date"
and, instead of "Any Date", select "Greater Than".
Then put in a number of days in the field to the right of "Greater
Than". E.g., I could put in 730 to find any calendar
entry that was more than two years old. You can then delete all of
those old entries, though you may receive many prompts for "You
have chosen to cancel this event. Do you want to notify the Organizer?"
After you've finished, you can then right-click on Calendar
again and select Properties and Storage to see
how much space you freed be removing the old entries.
The xlrd module provides the capability to work with Microsoft Excel
spreadsheets in Python. I wanted to be able to use a Python script to
extract the data from one column of an Excel worksheet and write the
data to a text file which I could further process with another script.
Xlrd, which is a package for reading data and formatting information
form Excel files, allowed me to easily extract just the data I needed,
which was a list of email addresses, from the spreadsheet. A tutorial
is provided for installing and using the module.
I sometimes want to have the width of a
div element
on a webpage stretch only as far as the width of the text contained
within it. E.g., if I want to show the text I see displayed in a
command prompt window on a Microsoft Windows system or a shell prompt
on a Linux or OS X system in an area on the web page with a black
background and white text within it, I will enlose the text in a
div such as the following:
<div style="background-color: black; color: white;"><pre>
C:\Windows\system32>wbadmin get items -version:01/25/2015-18:00
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2012 Microsoft Corporation. All rights reserved.
Volume ID = {46a6263c-8cbc-11e4-93ed-806e6f6e6963}
Volume 'RECOVERY', mounted at <not mounted> ('RECOVERY', mounted at <not mounted
> at the time</pre></div>
Which would display as shown below:
C:\Windows\system32>wbadmin get items -version:01/25/2015-18:00
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2012 Microsoft Corporation. All rights reserved.
Volume ID = {46a6263c-8cbc-11e4-93ed-806e6f6e6963}
Volume 'RECOVERY', mounted at <not mounted> ('RECOVERY', mounted at <not mounted
> at the time
But that will make the area with the black background extend across the
entire page rather than only as far as the 80th character on the page, i.e.,
the "d" at the end of "mounted", which is where the line wraps in the command
prompt window. I can add width: 80ch; to the style section
to specify that I only want it to be 80 characters wide, i.e., I can use
the following:
The width of a character is judged to be the width of the zero
character in the current font, but I've found that won't always work in
all browsers and may give me an area that, though it doesn't now extend
across the whole page when I don't want it to do so, may be too wide or
too narrow depending upon the browser in which I'm viewing it.
The above example is shown again below with the style information changed
to include width: 80ch;.
C:\Windows\system32>wbadmin get items -version:01/25/2015-18:00
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2012 Microsoft Corporation. All rights reserved.
Volume ID = {46a6263c-8cbc-11e4-93ed-806e6f6e6963}
Volume 'RECOVERY', mounted at <not mounted> ('RECOVERY', mounted at <not mounted
> at the time
When I view the page in Chrome version 39, the above div is wider
than I want, i.e, it extends far beyond the "d" in "mounted", i.e.,
far beyond the 80th character. Though when I view it in Firefox 35, I
see the width of the div extending only as far as the 80th character. If
I view it with Internet Explorer, it is not wide enough, so I see the
black area terminated after "mounted at <" with the followng "n" only
partially visible and the rest of the line invisible.
Another option is to use display: inline-block;, instead,
i.e., I can change the div line to be the following:
The div section then displays the following when I've ended
the line of text I want wrapped at the 80th character at that
character:
C:\Windows\system32>wbadmin get items -version:01/25/2015-18:00
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2012 Microsoft Corporation. All rights reserved.
Volume ID = {46a6263c-8cbc-11e4-93ed-806e6f6e6963}
Volume 'RECOVERY', mounted at <not mounted> ('RECOVERY', mounted at <not mounted
> at the time
The width of the black backround, i.e., the width of the div, extends
only as far as the width of the longest element within it, which is
the line I ended at the 80th character and works in all three browsers.
So I added the following line to the style.css file for the
site:
So I can then use <div class="commandprompt"><pre>
when I want a div, which will only contain text from a shell or command
prompt window, to stretch only as far as to accomodate the longest
element within it, which will be an 80 character line. So the div will
stretch, or shrink, however you prefer to view it, to fit.
If you've set up server backups on a Windows Server 2012 Essentials system,
the wbadmin command can be run from a command prompt to
check the status of backups and view the available backups and the
items they contain. The command is available for Windows Server
2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2,
Windows Vista and Windows 8, also; i.e., it can be run on workstations as
well as servers. The command will allow you to back up and restore a
systems's operating system, volumes, files, folders, and applications
from the command line.
One of the steps in setting up a Windows Server 2012 Essentials system
is to configure the server for automatic backups of the system to another drive.
You can configure the system to backup the operating system, server
folders, and other items by selecting "Set up Server Backup" from
the Dashboard. The drive, or drives, you select to be used for
the automatic backups, may be reformatted, so don't select a drive that
has files you wish to retain without copying them elsewhere first. You
can configure the backups to run at multiple times during the day;
Microsoft recommends you backup the server at least twice per day.
The command line program diskpart can be used on Microsoft Windows 2000
and later systems to obtain details on the disk drives connected to a system
and the partitions and volumes on the disk drives. To use the
utility, at the diskpart prompt, which can be obtained by running the
program, you select the disk by number and then the partition or volume for
which you wish information by typing detail followed
by partition or volume, or you can obtain
overall information for the drive with detail disk.
If you woul like to see a list of all the
Quick Fix Engineering (QFE)
updates, aka hotfixes, for a Microsoft Windows system from the
command line, you can enter the command wmic qfe list. The
command will work from systems from Windows XP Professional onwards. You
can control the amount of information displayed for each hotfix by
including a list format after the word "list", e.g., wmic qfe list
brief. You can see the available formats with wmic qfe list
/?. The following LIST formats are available:
Format
Includes
BRIEF
Description, FixComments, HotFixID, Install Date,
InstalledBy, InstalledOn, Name, ServicePackInEffect, Status
You can direct the output to a file by specifying
/output:filename before qfe list. E.g.:
C:\Users\User>wmic /output:hotfixes.txt qfe list brief
The output in the above example would be in
hotfixes.txt.
If you wanted the output to go to the clipboard, instead, you could use
wmic /output:clipboard qfe list brief.
If you open a command prompt window on a Microsoft Windows system, the
title for the window will be "Command Prompt".
If you have several command prompt windows open, you might like to
have each uniquely identifiable by a distinct title, so that you can
easily select the relevant one. You can use the title command to
change the title that appears at the top of a command prompt window. The
syntax for the command is as follows:
C:\>title /?
Sets the window title for the command prompt window.
TITLE [string]
string Specifies the title for the command prompt window.
E.g., you could change the title to Test with title
Test.
You don't need to include text in quotes after the title command if
the text contains spaces. E.g., you can use title Mary had a little lamb
to have the title appear as Mary had a little lamb. If
you put quotes on the command line after the title, the quotes would appear
in the window title.
If you give unique titles to the command prompt windows, you can also
tell how much memory each one is using with the tasklist command by filtering
on WINDOWSTITLE. E.g., if I had two command prompt windows open
with one named "Mary had a little lamb" and another titled "Jack and Jill":
C:\>tasklist /fi "WINDOWTITLE EQ Mary had a little lamb"
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
cmd.exe 14020 Console 1 2,696 K
C:\>tasklist /fi "WINDOWTITLE EQ Jack and Jill"
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
cmd.exe 11536 Console 1 2,188 K
If the title you choose is very long, only part of the text may be
displayed in the windows title with three dots substituted for the rest
of the text that can't be fit into the available space for the title.
To restore a prior browsing session in the Google Chrome browser
immediately after reopening Chrome, take the following steps:
Click on the Chrome menu
on the browser toolbar.
Select Recent Tabs
Under Recently closed, you will see the number of tabs
that were open during the last browsing session as "x Tabs" where
x is the number of tabs that were open before Chrome was
closed, e.g., "8 Tabs", if that was the number previously open.
Click on the "x Tabs" line to reopen all of those tabs.
If you would like Google Chrome to prompt for the directory into which
it will save a file that you are about to download rather than putting
it in the downloads directory for the account you are using or some
other default directory, take the following steps:
Click on the Chrome menu
on the browser toolbar.
Select settings.
Click on Show advanced settings.
Scroll down to the Downloads section.
You can put a directory path in the "Download location" field to have a
set downloads directory; to be prompted as to where a file should be stored
each time you download a file, check the check box for "Ask where to save
each file before downloading".
Once you've made the change to the setting you can close the Settings tab
in Chrome.
The setting for whether a file is downloaded into a default
location or for Chrome to prompt the user for the location is
controlled, like other Chrome settings, in the Preferences
file for the account, which is stored beneath a user's home directory.
On a Mac OS X system, you can view the file from a command prompt
using the Terminal application by going to the directory shown
below:
$ cd ~
$ cd "Library/Application Support/Google/Chrome/Default"
$ more Preferences
On a Microsoft Windows system you can find the Preferences
file at %USERPROFILE%\AppData\Local\Google\Chrome\User
Data\Default\Preferences. The environment variable %USERPROFILE%
is usually C:\Users\username where username
is the account name. So you can open the file in Notepad from a command
prompt with:
You can edit the Preferences file with a text editor and
add "prompt_for_download": true to the download
section of the file to have Chrome prompt for the location in which to
place a downloaded file. E.g., the default configuration for the download
section when the downloads directory for an account is used is shown
below followed by the configuration when Chrome will prompt for the
location:
Note: the "extensions_to_open": "" line may or may not
be present for default Chrome settings; I saw it on a Mac OS X system,
but it wasn't present on a Microsoft Windows system. But you only need
add the line to set the "prompt_for_download" to true.
Google Sheets
provide a free online spreadsheet program. If you want to insert
a URL into a cell in a Google sheet, the syntax is
=HYPERLINK(URL,cell_text). The cell_text is
the text displayed for the URL. It is an optional argument; if it isn't
provided, the URL will be displayed. The URL and cell_text need to be
enclosed in double quotes.
So, how do you specify cell text when that text includes quotation marks.
E.g., for a title of Fixing "To" Addresses in a Queued Message,
using
=hyperlink(http://support.moonpoint.com/blog/blosxom/2005/04/06#fixing-to-address","Fixing "To" Addresses in a Queued Message")
won't work, since the first double quote character appearing after the beginning
one before Fixing signals the end of the cell_text.
Often a backslash character, \ can serve as an
escape character
indicating that the character that follows isn't to be treated the way
it would normally be treated by software, i.e., any special significance
for the following character is to be ignored. But in this case that didn't
work. I still saw #ERROR! in the cell and a little red triangle in
the cell that when clicked on displayed Error: Parse. Nor would
using the &ldquote; and &rdquote;
that can be used in HTML coding to signify left and right double quotes.
That just resulted in that text being displayed with the rest of the
cell text. What I found did work was to use the double
quote character itself as an escape character, so that if
two double quotes are placed one after the other in cell_text,
a double quote will appear within the cell_text. E.g., in the above case,
=hyperlink("http://support.moonpoint.com/blog/blosxom/2005/04/06#fixing-to-address","Fixing ""To"" Addresses in a Queued Message") worked
to display Fixing "To" Addresses in a Queued Message for the cell
text. You don't need to escape any single quotes within the cell_text,
only the double quotes. You can also escape double quote characters within
a URL the same way.
If a file that would be automatically run at system boot or login time
doesn't actually exist, Microsoft Windows may show an entry named
"Program", with no publisher listed, in the list you see when you click
on the Startup tab in the Windows Task Manager. If
you right-click on the entry, you will see the "Open file location" option
grayed out. You can use the Microsoft autoruns utility to track down
the registry entry that is resulting in the "Program" entry appearing in
the startup list for the Task Manager. When you locate it,
you can uncheck it in autoruns to stop the entry from appearing in the
Task Manager.
I've used Vuze as a BitTorrent client on a number of systems previously
without problems. However, when I installed it on a new system for my
wife recently, I found that the bundled software that came with it,
which I thought I had indicated I didn't want installed with Vuze,
set itself up as a proxy server for HTTP and HTTPS traffic and installed a
self-signed security certificate into the root certificates list on the system,
effectively nullifying the protection offered by viewing sites with HTTPS
rather than HTTP and potentially exposing any userids and passwords,
credit card numbers, etc. to the view of the bundled GeniusBox software.
I first noticed that a serious security issue had occurred when
I mistyped a site's URL and saw a webpage displayed referencing
d2e24t2jgcnor2.webhostoid.com, instead of the expected site.
Microsoft Windows, Apple OS X and Linux systems use different means of
representing the end of a line in text files. E.g., see
OS X Line Endings.
Microsoft Windows and its predecessor operating system, DOS, use
a carriage return (CR), which is a hexadecimal 0D, followed by a line feed (LF),
which is a hexadecimal 0A, at the end of each line, whereas only the
LF character, i.e., the character represented by a hexadecimal 0A is used on
Linux systems.
If you upload a text file, such as a .txt or .html file, from a Windows
system to a Linux system and then edit it with vi, you may see
^M appear at various places in the file. To convert a text
file from the DOS/Windows format to the one used by Linux, you can
use the dos2unix utility.
You can install the dos2unix utility on a CentOS 7 system with the
command yum install dos2unix. The program will be
installed in /bin.
# which dos2unix
/bin/dos2unix
# rpm -qi dos2unix
Name : dos2unix
Version : 6.0.3
Release : 4.el7
Architecture: x86_64
Install Date: Sat 17 Jan 2015 10:42:01 PM EST
Group : Applications/Text
Size : 178697
License : BSD
Signature : RSA/SHA256, Thu 03 Jul 2014 09:09:30 PM EDT, Key ID 24c6a8a7f4a80eb5
Source RPM : dos2unix-6.0.3-4.el7.src.rpm
Build Date : Mon 09 Jun 2014 06:00:48 PM EDT
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org>
Vendor : CentOS
URL : http://waterlan.home.xs4all.nl/dos2unix.html
Summary : Text file format converters
Description :
Convert text files with DOS or Mac line endings to Unix line endings and
vice versa.
The syntax for the command is shown below:
$ dos2unix -h
dos2unix 6.0.3 (2013-01-25)
Usage: dos2unix [options] [file ...] [-n infile outfile ...]
-ascii convert only line breaks (default)
-iso conversion between DOS and ISO-8859-1 character set
-1252 Use Windows code page 1252 (Western European)
-437 Use DOS code page 437 (US) (default)
-850 Use DOS code page 850 (Western European)
-860 Use DOS code page 860 (Portuguese)
-863 Use DOS code page 863 (French Canadian)
-865 Use DOS code page 865 (Nordic)
-7 Convert 8 bit characters to 7 bit space
-c, --convmode conversion mode
convmode ascii, 7bit, iso, mac, default to ascii
-f, --force force conversion of binary files
-h, --help give this help
-k, --keepdate keep output file date
-L, --license display software license
-l, --newline add additional newline
-m, --add-bom add UTF-8 Byte Order Mark
-n, --newfile write to new file
infile original file in new file mode
outfile output file in new file mode
-o, --oldfile write to old file
file ... files to convert in old file mode
-q, --quiet quiet mode, suppress all warnings
always on in stdio mode
-s, --safe skip binary files (default)
-F, --follow-symlink follow symbolic links and convert the targets
-R, --replace-symlink replace symbolic links with converted files
(original target files remain unchanged)
-S, --skip-symlink keep symbolic links and targets unchanged (default)
-V, --version display version number
To convert the format of a file using the same file for both input
and output, you only need specify the file name as an argument to
dos2unix. E.g.:
$ dos2unix index.php
dos2unix: converting file index.php to Unix format ...
A laptop may be used to connect to many wireless networks with a unique
Wi-Fi Protected
Access (WPA), Wi-Fi Protected Access II (WPA2), or
Wired
Equivalent Privacy (WEP) key, which can be regarded as a Wifi password,
for each of those networks stored within a wireless profile on the
laptop. If you need to configure another device, e.g., a phone, tablet
or another laptop, to use the same key and want to view what has been
stored on the laptop from a command prompt, under Windows 8 you can use
the command netsh wlan show profiles to view all of the
stored Wi-Fi profiles.
C:\>netsh wlan show profiles
Profiles on interface Wi-Fi:
Group policy profiles (read only)
---------------------------------
<None>
User profiles
-------------
All User Profile : belkin54g
All User Profile : Imp
All User Profile : Harbor
All User Profile : Guest
All User Profile : library
All User Profile : T28J7
All User Profile : NETGEAR
All User Profile : linksys
You can then retrieve the key used for a particular profile by specifying
it with name=profile, where profile is one of
the stored profiles, followed by key=clear.
C:\>netsh wlan show profiles name=T28J7 key=clear
Profile T28J7 on interface Wi-Fi:
=======================================================================
Applied: All User Profile
Profile information
-------------------
Version : 1
Type : Wireless LAN
Name : T28J7
Control options :
Connection mode : Connect manually
Network broadcast : Connect only if this network is broadcasting
AutoSwitch : Do not switch to other networks
Connectivity settings
---------------------
Number of SSIDs : 1
SSID name : "T28J7"
Network type : Infrastructure
Radio type : [ Any Radio Type ]
Vendor extension : Not present
Security settings
-----------------
Authentication : Open
Cipher : WEP
Security key : Present
Key Content : 719DDAB7A9
Key Index : 1
Cost settings
-------------
Cost : Unrestricted
Congested : No
Approaching Data Limit : No
Over Data Limit : No
Roaming : No
Cost Source : Default
C:\>netsh wlan show profiles name=Harbor key=clear
Profile Harbor on interface Wi-Fi:
=======================================================================
Applied: All User Profile
Profile information
-------------------
Version : 1
Type : Wireless LAN
Name : Harbor
Control options :
Connection mode : Connect automatically
Network broadcast : Connect only if this network is broadcasting
AutoSwitch : Do not switch to other networks
Connectivity settings
---------------------
Number of SSIDs : 1
SSID name : "Harbor"
Network type : Infrastructure
Radio type : [ Any Radio Type ]
Vendor extension : Not present
Security settings
-----------------
Authentication : WPA2-Personal
Cipher : CCMP
Security key : Present
Key Content : ccc777cc
Cost settings
-------------
Cost : Unrestricted
Congested : No
Approaching Data Limit : No
Over Data Limit : No
Roaming : No
Cost Source : Default
In the above two examples, the WEP key for the wireless network
with an SSID of "T28J7" is "719DDAB7A9" and the WPA2-Personal key for the
wireless network named "Harbor" is "ccc777cc"
Nir Sofer provides many free network and system tools for Windows systems
from his website, NirSoft.
One of those tools, HTTPNetworkSniffer, provides the capability to
"sniff", i.e, capture and examine, the HTTP network traffic between
the system on which the tool is installed and the web servers contacted
from that system. All, or portions, of the data captured can be saved
to a file in a variety of formats for later examination. Those formats
include the following ones:
A program can be digitally signed to verify the developer or publisher
of the program. Digital signatures provide a means to authenticate that
software actually came from the claimed author and has not been modified
since the author published the software. However, they don't guarantee
that the software is safe to use, since even adware/spyware may be signed
digitally.
On a Microsoft Windows system, information on the digital signature
can be viewed with the PowerShell cmdlet Get-AuthenticodeSignature,
which is included with Microsoft Windows 7 and later; PowerShell is also
available from Microsoft for earlier versions of their operating system.
The Sysinternals tool, Sigcheck from Microsoft may also be used
to check the digital signature on a file.
In Google Chrome on a Microsoft Windows system you can check or change the
proxy server setttings by the following steps within the Chrome browser.
Note: changing the proxy server settings by this means changes the system-wide
proxy server settings, so the configuration changes you make will also apply
to Internet Explorer.
Click on the "Customize and Control Google Chrome" button at the top,
right-hand side of the Google Chrome window. It is represented as a button
with 3 short horizontal lines on it.
Select Settings
Click on the "Show advanced settings" link near the bottom of the window.
Scroll down to the Network Settings section and click on
the Change proxy settings button.
That will open an Internet Properties window where you can
click on the LAN settings button, which will open a
Local Area Network (LAN) Settings window.
Check the checkbox next to "Use a proxy server for your LAN (These settings
will not apply to dial-up or VPN connections)."
Click on the Advanced button, which will open a
Proxy Settings window.
Put in the IP address and port number for the proxy server in the
"Proxy address to use" and "Port" fields. You will see four types of proxies
listed: HTTP, Secure, FTP, and Socks. The line where you will place the
IP address and port number will depend on which of those you are using.
Click on OK and then OK again at the
Local Area Network (LAN) Settings window, and again
at the Internet Properties window.
Note: tested on Google Chrome 39.0 on a Microsoft Windows system.
If you wish to find all of the files modified on or after a particular
date on a Unix/Linux system, you can use the find command
with the newermt argument. E.g., suppose I want to find
all files with a .php extension modified on or after January 10, 2015 in the
current directory and any subdirectories. I could use the command below:
find . -name "*.php" -newermt 2015-01-10
The -newermt argument, which is a form of -newerXY
is explained below:
-newerXY reference
Compares the timestamp of the current file with reference. The
reference argument is normally the name of a file (and one of
its timestamps is used for the comparison) but it may also be a
string describing an absolute time. X and Y are placeholders
for other letters, and these letters select which time belonging
to how reference is used for the comparison.
a The access time of the file reference
B The birth time of the file reference
c The inode status change time of reference
m The modification time of the file reference
t reference is interpreted directly as a time
Some combinations are invalid; for example, it is invalid for X
to be t. Some combinations are not implemented on all systems;
for example B is not supported on all systems. If an invalid or
unsupported combination of XY is specified, a fatal error
results. Time specifications are interpreted as for the argu‐
ment to the -d option of GNU date. If you try to use the birth
time of a reference file, and the birth time cannot be deter‐
mined, a fatal error message results. If you specify a test
which refers to the birth time of files being examined, this
test will fail for any files where the birth time is unknown.
A Juniper Networks NetScreen firewall running the ScreenOS operating system
can also serve as a DHCP server. The firewall can be configured through
a GUI by accessing
the firewall from a browser, but also has a command line interface, which
is accessible via a SSH connection.
The DHCP configuration provided by the server upon DHCP client requests can
be configured via the command line interface where you can set
the DNS servers, gateway address, netmask, etc. or enable and disable the
DHCP server functionality in the firewall.
Windows maintains a list of trusted
root certificates,
which are used when you are visiting websites that use the
HTTPS protocol for
security. A website using HTTPS will have a security certificate that
has usually been signed by some more trusted entity. A site can use a
self-signed certificate, but when you first visit such a site your browser
will warn you that its certificate can't be verified, though your connectivity
will still be encrypted if you visit the site. You then usually have the
opportunity to accept that certificate either temporarily or permanently or
can choose not to visit the site.
For signed certificates, the trustworthiness of the signer is vital.
There may be a certificate chain with the certificate of the site you
are viewing having a certificate signed by some entity that in turn had
its own certificate signed by an even more trustworthy authority. Eventually,
the chain ends at a trusted root certificate. To be safe when visiting
sites and providing credentials, such as userids and passwords, you need
to have a trusted chain of certificates. It is vital that the root
certificates you have on your system belong to very trustworthy authorities.
Microsoft distributes a list of trusted root certificates with its operating
system and browsers, such as Firefox, may have their ownl list, but some
malware, such as Genius Box, will install its own certificate
in the Windows trusted root certificates list making a system susceptible
to a man-in-the-middle
attack as the GeniusBox software also sets itself up as an HTTP and
HTTPS proxy on a system it infects.
Microsoft Windows stores information contained in the HKEY_CURRENT_USER
branch of the registry, which is often abbreviated as HKCU,
in the file NTUSER.DAT. That file is stored in the user's
profile directory, which is usually C:\Windows\Username,
where Username is the account name. The location can be checked by
issuing the command echo %USERPROFILE% from a command prompt
while logged into the account.
The file is a hidden and system file, so you would need to turn on
the display of hidden and system files in the Windows Explorer to see it,
but even then, if you are logged into the account for which you are trying
to access NTUSER.DAT it will be locked from
access. You can view the contents of the file for another account
or the contents of a backup copy of NTUSER.DAT
using the RegFileExport utility from NirSoft as explained in
Recovering information for the HKCU branch of the registry from a
backup.
The location for the various wallpapers that come with Windows 7 is
%SYSTEMROOT%\Web\Wallpaper%. The
Windows
environment variable%SYSTEMROOT% usually points to
C:\Windows, but you can check its value on a particular
system from a command prompt with echo %SYSTEMROOT%.
C:\Users\Pamela>dir %SYSTEMROOT%\Web\Wallpaper
Volume in drive C is OS
Volume Serial Number is 4445-F6ED
Directory of C:\Windows\Web\Wallpaper
11/04/2011 01:00 AM <DIR> .
11/04/2011 01:00 AM <DIR> ..
11/21/2010 02:16 AM <DIR> Architecture
11/21/2010 02:16 AM <DIR> Characters
11/04/2011 01:00 AM <DIR> Dell
11/21/2010 02:16 AM <DIR> Landscapes
11/21/2010 02:16 AM <DIR> Nature
11/21/2010 02:16 AM <DIR> Scenes
11/21/2010 02:16 AM <DIR> Windows
0 File(s) 0 bytes
9 Dir(s) 863,115,665,408 bytes free
C:\Users\Pamela>echo %SYSTEMROOT%
C:\Windows
The location of the current wallpaper for the currently logged on user
can be found by a reg query command.
If you pick an image you want to use for wallpaper, it will be copied to the
location in the above registry key and renamed
TranscodedWallpaper.jpg, which allows you to modify the original
image without changing the wallpaper, but may seem confusing if you are
expecting the file name to be the same as it was for the original image you
selected for the wallpaper.
Web browsers can be configured to use a proxy server for network connections,
i.e., instead of directly connecting to websites, the connections are
routed to a proxy server, which then establishes a connection to the
website and routes the return traffic from the site back to the browser.
This may be done for security reasons, e.g., the proxy server may be
running antivirus software that checks all downloads from websites before
passing files on to users' systems or the proxy server may be used to
block access to websites deemed malicious, i.e., ones distributing malware,
or ones that are deemed inappropriate for the workplace or by children, if
the proxy server is located in a home rather than a business environment.
A proxy server may also be used to hide the actual IP address of the system
on which the browser is running for privacy reasons.
The proxy server settings for the system can be configured within
Internet Explorer on a Microsoft Windows system. They can also be queried
and set from a command line interface using the reg query
or reg add commands.
I needed to configure an old Juniper Networks 5XP firewall from a command line
interface, so that I could block all access to the Internet from that
system, but, since it had been a very long time since I set a rule in one of
those firewalls from its command line interface, which is accessible via
SSH, it took me some time to get the syntax right for the command after
realizing I had to associate the IP address with a name that I could use
in the policy for the system first.
In a Microsoft Windows domain where the domain controller is a
Windows Server 2012 Essentials server, backups are normally done on
a daily basis to the server. From the Dashboard, which is accessible
from the Launchpad, on a client computer you can restore
files and folders from backups on the server by these steps. You will have
the option of selecting which of the daily backups you wish to use to
restore the client computer.
The Launchpad on the client computer also provides the capability
to initiate a backup from the client to the server and to check on the
status of the last backup of the client to the server.
While editing a note in the Evernote application on a Microsoft Windows system
today I was plagued by an annoying popup appearing every few seconds with a
title "Related to what you're working on". It appeared the "content" being
suggested to me was an add, since I saw "For $200, a Windows Laptop That's
Wor...", but when I clicked on the link, I found it pointed to a Wall Street
Journal article HP Stream 11 Review: A $200
Windows Laptop That’s Worth the Price.
Though some of the "Related to
what you're working on" notices I've seen have been relevant, this one was not
and I don't want the distraction of such notices when trying to use the
software for note keeping. If I dismiss such a notice, I don't want to see it
constantly reappearing every few seconds until I'm forced to click on it to
stop it from reappearing.
If you click on Tools from the Evernote window and select
Options, then Context, you can manage those notices.
In this case rather than just unchecking "Show Context", I clicked on
Manage Context Sources, which opened a web page in a browser on
the system. From that page I could select which sources would be used; I
unchecked the one for The Wall Street Journal, since this is the first
time I've encountered the annoyance of a notice appearing repeatedly every
few seconds in Evernote and have not experienced it from any other source.
When I tried to access a Simple Machines
Forum (SMF) website after rebooting the server on which it resides, I saw
the message below:
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the
server being busy. Please try again later.
When I tried to check access to the database it uses with the
mysql command, I saw the following error message:
# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
The system uses MariaDB,
a fork of the MySQL relational database management system (RDBMS) for databases.
Checking prior notes
on the error message, I found it can indicate that the
mariahdb database service didn't start when the system rebooted. From
the root account I issued the command systemctl start
mariadb.service . When I tried accessing the forum again, it was then
accessible.
If Google Drive files are not synchronizing between systems or files are
not appearing when you view the conents of your Google Drive storage area
from a browser by going to drive.google.com, it is possible the system
that should be synchronizing the files has lost its connection to Google
Drive. Clicking on the Google Drive icon in the system tray should reveal
if that is the case. It can be easy to remedy the connection problem, but
you may have to wait a fair amount of time before all files are synchronized
after you reestablish the connection.
Images may be used to provide clickable buttons on a webpage, but one can
also create buttons entirely with text using Cascading Style Sheets (CSS).
Rectangular buttons can be created or the buttons can be given rounded
corners using a border-radius value.
E.g., the following could be used to create a green button with rounded
corners with the word "Download" in it in white text:
The color used for the
anchor text for
a link on a web page can be controlled through Cascading Style Sheets (CSS)
inserted into the head section of a web page. You can change the color used
for a link before it is visited, after it is visited, when someone hovers a
mouse over the link, and when someone clicks on the link, but hasn't yet
visited the web page.
MediaMonkey
provides the capability to manage a movie/music library, even ones
containing over 100,000 files whether they are on a hard drive, CD, DVD,
or on other devices on your network. You can organize, browse or search
music by genre, artist, year, rating, etc. It supports a variety of
audio/video formats such as MP3, AAC (M4A), OGG, WMA, FLAC, MPC, WAV,
CDA, AVI, MP4, OGV, MPEG, WMV, M3U, PLS, etc. For
codecs your system
doesn't already support, you can install a codec pack for it to support
additional formats. If you don't have support for the codecs already on
the system, it will provide support for the following codecs: