I needed to determine which packages were recently installed on a
CentOS
7 system where
yum is used to install packages. The command
rpm -qa --last will list all packages that have been installed
in chronological order with the most recently installed packages listed
first, since the --last option orders the package listing by
install time such that the latest packages are at the top. E.g.:
I needed to convert a
rar
file to a zip file on a
CentOS 7
Linux system. But when I tried installing an unrar package with
yum, the
package
manager on the system, I found none was available from any of the
software
repositories the system was configured to check for packages.
# yum install unrar
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.firehosted.com
* epel: mirror.us.leaseweb.net
* extras: centos.aol.com
* updates: mirror.umd.edu
No package unrar available.
Error: Nothing to do
# yum install rar
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.firehosted.com
* epel: mirror.us.leaseweb.net
* extras: centos.aol.com
* updates: mirror.umd.edu
No package rar available.
Error: Nothing to do
#
I had previously installed support for the
Extra Packages for
Enterprise Linux (EPEL) repository, but though I thought the unrar package
might be found there, it wasn't found. I did find an
RPM file for the software, howerver, at
RPM CentOS 7 unrar 5.0.12 x86_64 rpm. I downloaded that file with
wget and, since
yum can be used to install RPM files, installed it with yum.
If you wish to ignore lines at the start of output or in the beginning of a
file, you can use the more
command to do so. E.g., suppose I have a text file named fruit.txt
that contains the following lines:
apple
banana
clementine
date
eggplant
fig
grape
On a Linux,
Unix, or
OS X/macOS
system, if I want to see all lines of the file but the first one, I can use
the +n, where n is a number, argument to the
more command. In this case, I can use more +2 fruit.txt
to start the output at the second line in the file.
$ more +2 fruit.txt
banana
clementine
date
eggplant
fig
grape
$
If I wanted to ignore the first four lines and start output at the fifth
line, I could use more +5.
If you need to redirect the output of
SQL commands to a
file while using
SQLite, you can do so using the .output command. E.g., I have
an SQLite database on my MacBook Pro laptop running
OS X that
contains a table named Equipment. Within that table is a column named Device
that is a description for the particular piece of equipment in the
table entry. I can view just that field for all records with the
SQLite command SELECT Device FROM Equipment. To direct
the output of the command to a text file named device.txt,
I can use the command .output device.txt. After executing
the command to select the Device field from all records, I can then
issue the .output command without any arguments to it to
return to having the output of commands displayed on the console rather
than going to the file.
$ sqlite3 ~/Documents/Work/CRQ/CRQ.db
SQLite version 3.8.10.2 2015-05-20 18:17:19
Enter ".help" for usage hints.
sqlite> .output device.txt
sqlite> SELECT Device FROM Equipment;
sqlite> .output
sqlite>
I usually have the OS X
Finder
set to display folders and files in alphabetical
order by setting the view mode to arrange the display of files and folder by
name. But sometimes I switch to view by size, etc. However, when I then switch
back to view the files and folders in column mode arranged by name, Finder
doesn't actually display them in alphabetical order, which is annoying.
You have not specified an encryption
certificate for this account. Once you send
this encrypted message, you will not be
able to read it. Do you still want to send this
encrypted message?
If I click on Continue the email will be sent encrypted so that it
is readable by the recipients when their email clients decrypt it using their
private keys, but I am unable to read the message I sent when it is placed in
my Sent folder. To resolve the problem, I clicked on Tools on the
Outlook menu bar, then selected Accounts, then clicked on the
Advanced button. I then clicked on the Security tab and selected a
certificate in the Encryption section. It had been set to "None
Selected".
You can check on whether the
Simple Network
Management Protocol (SNMP) service has already been added to a Microsoft
Windows 10
system by opening a Services window and scrolling through the list
of services to see if SNMP is present. You can open a Services window
to check the list of installed
services by typing services in the
Cortana "Ask me anything" field and hitting Enter. The best
match shown should be "Services Desktop app". You can click on it to see
the list of
Windows services.
If you see SNMP Trap, but not SNMP Service, you will need
to add the service. The process for adding it is similar to the process of
adding support for SNMP under
Windows 7.
A couple of days ago, a user showed me a message she saw on her system about a
security
certificate issue. When I looked at the message, I realized it was due
to the expiration of the
Let's
Encrypt certificate on the email server used by her system. I logged into
that system and queried the server with the
openssl command to
check the expiration date. I saw it had expired that day, March 10.
On my MacBook Pro laptop running
OS X El
Capitan (10.11.6), I've been losing Internet connectivity periodically.
Though it appears I still have Wi-Fi connectivity, when I attempt to access websites
through a browser I find that I can't access sites at times, though a moment
before I had no issues browsing the Web. Firefox will display a "Server not
found" message. If I go to a
Terminal window and try to ping any IP address, I see "request timeout"
messages.
$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
$
If I check the status of the WiFi connection using the
airport
command, I see that it is very noisy, though the signal stength is good, which
I would expect, since the laptop is only a few feet from the wireless router.
$ /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I
agrCtlRSSI: -39
agrExtRSSI: 0
agrCtlNoise: -93
agrExtNoise: 0
state: running
op mode: station
lastTxRate: 73
maxRate: 72
lastAssocStatus: 0
802.11 auth: open
link auth: wpa2-psk
BSSID: 94:44:52:4a:43:40
SSID: Rain
MCS: 7
channel: 11
$
If I attached the PIV card reader and clicked on the Apple icon at the
top, left-hand corner of the screen and selected About This Mac
then clicked on System Report, if I clicked on USB under
Hardware, I would see the system recognized the card reader was
attached. E.g., I saw "SCRx31 USB Smart Card Reader" for an SCR331 (that
is a number on the underside of the device which appears to be its model
number with a part number of 904875 listed there, also) PIV card reader
I attached to the system via a USB port.
On a Microsoft Windows system, you can find files created before or after
a specified date using the Get-ChildItem cmdlet. To use the
cmdlet, open a PowerShell window - you can do so on a Windows 10 system by
typing powershell in the
Cortana "Ask me anything" window, hitting Enter, and then clicking
on Windows PowerShell, which should be returned as the best match. If
you wish to find files and directories before a certain date, you can use a
command in the form Get-ChildItem | Where-Object {$_.LastWriteTime -lt
date where date is the relevant date. E.g., on a system
that uses the date format of mm/dd/yyyy where mm represents the month, dd the
day and yyyy the year, a command like the one shown below, which returns a
list of the files with a modification time prior to January 1, 2013, can be
used:
The third specification of the
Cascading Style
Sheets (CSS) style sheet language,
CSS 3 provides support for
media queries, which
can adjust the display of information in a browser based on
screen resolution, e.g. smartphone screen vs. computer screen, the width
of the browser
viewport, etc. This is done through the use of
"@media,
which can be used in a style sheet or a style element included in the
<head> section of the HTML code.
Two parameters that can be used with @media are shown below:
max-width
The maximum width of the
display area, such as a browser window
min-width
The minimum width of the
display area, such as a browser window
I was reminded tonight why one should avoid using Microsoft's latest
desktop operating system, Windows 10, for any critical system. I had
postponed some work on a Microsoft Windows 10 system that I was connected
to by a Remote Desktop Protocol (RDP) connection. I had been working
on the system a few days ago and returned to using the connection this
evening only to see the system was going to reboot in a few minutes for
an automatic update. I often have many applications and windows open at
once and I knew there wasn't enough time for me to save all of my work,
but I thought, even though I only had a few minutes remaining until the
forced reboot, that I could at least postpone the reboot until tomorrow evening
using the steps at
Changing the time for a Windows 10 automatic restart that I've used before
to postpone the forced reboot due to a software update. However, tonight
when I got to the Windows Update settings window where a "Restart
now" button appears, I was not able to click on "Change active hours"
because that option did not appear under the "Restart now" button. I
frantically tried to find another alternative. I thought, perhaps,
I could hibernate the system to save the work in progress, but it was
too late; the system rebooted and I lost all of the work in progress,
much of which I'll be unable to recreate, since it had been several days
since I had been working on the system and I now can't rememeber what I
had put in some open Notepad windows, etc.
I understand the need to update systems to install security patches
to prevent malware attacks, etc., but I've never lost data on this system
over the course of several years due to such issues. I've only lost data
due to Microsoft's automatic reboot "security feature".
I've read Microsoft is deigning to give their users a little more
control over reboots due to automatic updates with the release of
the Windows 10 "Creator's Edition" in April of 2017, e.g., see
Windows 10 now prevents random reboots during updates, but Microsoft's
decision that rebooting a system while a user is working on it even
when there are open unsaved files, because Microsoft has decided that
"this is for your own protection and too bad if you lose data" gives me
a much more negative view of the company and its products. And I know there
are many others similarly angered at the company after losing work to
these forced reboots in Windows 10.
I often receive Microsoft Excel files that have documents created by
other Microsoft applications embedded within them. E.g., at the top of
a worksheet I may see something like =EMBED("Visio.Drawing.11","").
Sometimes I want to extract the embedded file. With a Microsoft Excel .xlsm
file that is easy to do, because XLSM is a
zipped,
XML-based file format. To extract embedded documents, such as
Visio
drawings or
PowerPoint presentations, I make a copy of the .xlsm file then rename the
copy's extension from .xlsm to .zip. I can then extract the contents of the zip
file. Within the directory that holds the extracted files, there will be a
xl directory. Within that directory there is a media
directory and within the media directory there is an
embeddings directory that holds the embedded files, such as the
Visio drawings in the example below.
If you've been entering commands for configuration changes on a
Juniper Neworks
SRX router/firewall, which runs the
Juniper Network Operating System, Junos OS, but haven't committed those
changes to make them active, you can discard them using the command
rollback 0. which will replace the "candidate config", i.,e., the
one you've been editing, with the active configuration, which is also the
boot configuration.
The device can store multiple prior configurations and you can revert to
one of those other prior configurations, instead, using rollback n where n is the number for the prior configuration. You can
also rollback to a saved "rescue" configuration with rollback
rescue. You an see a list of the stored configurations to which you can
revert using the command rollback ?.