Technology Leadership Corporation Technology Products and Consulting Wed, 29 Mar 2023 12:54:23 +0000 en-US hourly 1 Fix yum hang on CentOS Thu, 24 Nov 2016 14:53:13 +0000 ls -l /var/lib/rpm

rm -f /var/lib/rpm/__db*

rpm -vv –rebuilddb

rm /var/run/


yum clean all

OPTIONAL: yum update

]]> 0
PowerShell Cheat Sheet Fri, 16 Sep 2016 22:01:45 +0000 Continue reading »

LINUX                          PowerShell

alias                             alias

alias cmd=’new alias’     Set-Alias ‘new alias’ cmd

cat a >> b                   cat a |sc b

clear                           cls

date                            Get-Date

df                                Get-PSDrive

echo “Hi”>>./file         Add-content ./file “Hi”

env                             Get-Variable

grep -i                         findstr /i

grep  <pattern>          Select-String -Pattern  <pattern>

hostname                   get-childitem -path env:computername

ip addr                        ipconfig

ls                                  ls

ls -a                             ls -force

ls -ltr                            ls | sort-object LastWriteTime -Descending

ls -R                             ls -r

nc servername 1433   Test-NetConnection -ComputerName ‘servername’ -Port 1433

ps -ef                           Get-Process

tail -n 10 -f ./x.txt         Get-Content ./x.txt -Wait -Tail 10

time                              measure-command

uptime                         (get-date) – (gcim Win32_OperatingSystem).LastBootUpTime |select Days,Hours,Minutes,Seconds

wget                             Invoke-WebRequest http://example.tar -OutFile example.tar

which                           Get-Command

who -T                         query user /server:$env:computername

| awk ‘{print $1}’            | %{ $_.Split(‘ ‘)[0]; }

Install an app (with sample arguments):

Start-Process -FilePath "C:\Temp\UpgradeClientInstaller\setup.exe" -ArgumentList "/S /v/qn"

Install using chocolatey:

choco install -y <packagename>

choco upgrade -y <packagename>



du without the du command Wed, 27 Jul 2016 01:57:27 +0000

ls -lR $1 | grep -v ^d | awk ‘{total+=$5;} END {print total;}’]]>
Print the number of bytes of storage capacity the current directory recursively uses:

ls -lR $1 | grep -v ^d | awk ‘{total+=$5;} END {print total;}’ ]]> 0
Unix Cheat Sheet Wed, 21 Oct 2015 13:31:53 +0000

:syntax off


Line count output (rate) per 1 second (e.g. to determine # of apache web requests at 1 second intervals)

tail -f access.log|perl -e ‘while (<>) {$l++;if (time > $e) {$e=time;print “$l\n”;$l=0}}’


Continue reading »

Turn off color in vi 

:syntax off


Line count output (rate) per 1 second (e.g. to determine # of apache web requests at 1 second intervals)

tail -f access.log|perl -e ‘while (<>) {$l++;if (time > $e) {$e=time;print “$l\n”;$l=0}}’


Detach foreground or background task from console



disown %1

]]> 0
Start in Amazon’s Cloud with TLC Mon, 17 Feb 2014 23:28:36 +0000 Amazon EC2 consulting

Amazon’s Elastic Cloud Computing (EC2) services are the next major technology wave invigorating and re-inventing American businesses big and small, and for good reason. With ability to deploy and re-deploy hardware and server configurations nearly instantaneously (and some automatically), along with charges for only the services and servers actually in-use, it removes the need for most businesses to provision their own data center (or expand existing ones), or pay for expensive hardware upgrades during ever increasingly rapid hardware churn.

The challenge, of course, is understanding the components underlying EC2 and leveraging the tools out there to effectively manage them. Technology Leadership, LLC (TLC) has provided this white paper free of charge, which includes the first steps on how to engage TLC quickly to begin hosting in the cloud.

The white paper does not cover the actual contract with TLC, as these contracts differ greatly based on their corporation’s needs and the level of their own in-house expertise. But, it provides the rationale for picking AWS EC2, utilizing the Chef Configuration Management tool set, and why account creation and management by TLC can be the easiest and quickest way to get started.

Click this link to download the white paper.

]]> 0