Convert a column of text to a row
Using paste: paste -sd” ” inputfile If you want to comma delimit the file, just add a comma in between the quotes: paste -sd”,” inputfile
A little bit of wisdom
Using paste: paste -sd” ” inputfile If you want to comma delimit the file, just add a comma in between the quotes: paste -sd”,” inputfile
Graph plotting with Gnuplot can be quite difficult without some basic knowledge of the syntax. I also find that some settings overwrite others, for an example see this post on Stackoverflow and the same applies in this script below where the second line overwrites the first, despite them supposedly being treated as separate lines. set […]
I had just refreshed my Surface Pro 2 with Windows 8.1 Pro. I could not get any Windows updates to work at all, anything I tried would just result in “Searching this computer for updates…”. After some research I discovered that I needed to install KB2919355 before I could install any updates, however all attempts […]
In the middle of setting up a new Windows domain, I had a non privileged user needing to install an application on his PC. Rather than go to his desk (or even remote desktop) I was able to install the software remotely using psexec. PS C:\PsTools\psexec -i \\target_pc \\target_pc\c$\(path to installer)
After downloading a new certificate from our SSL provider, I found I was unable to install this new certificate. Windows returned the error “Failed to Remove Certificate”. Using OpenSSL on a Linux box, I did the following: openssl pkcs12 -export -in my.crt -inkey my.key -certfile my.bundle -out my.pfx I was then able to import my […]
This documents how I got ClamAV (clamd) working on Windows Server 2012 I downloaded the 64 bit package <clamav-0.99-x64.msi> from sourceforge UPDATE: 01/2020 – The download location has moved to: https://www.clamav.net/downloads#otherversions I then created folders, as I wanted everything in the root of c:\ I have: c:\ClamAV-Conf\ c:\ClamAV-x64 |-\db |-\log Created config files: clamd.conf TCPAddr […]
HP Smart array CLI commands (these should apply to any system with the CLI installed) Show configuration /opt/hp/hpssacli/bin/hpssacli ctrl all show config Controller status /opt/hp/hpssacli/bin/hpssacli ctrl all show status Show detailed controller information for all controllers /opt/hp/hpssacli/bin/hpssacli ctrl all show detail Show detailed controller information for controller in slot 0 /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 show detail […]
Windows 7 Environment variables The variables most likely apply to later versions of Windows too. Variable name Value %ALLUSERSPROFILE% (%PROGRAMDATA%) C:\ProgramData %APPDATA% C:\Users\{username}\AppData\Roaming %COMPUTERNAME% {computername} %COMMONPROGRAMFILES% C:\Program Files\Common Files %COMMONPROGRAMFILES(x86)% C:\Program Files (x86)\Common Files %COMSPEC% C:\Windows\System32\cmd.exe %HOMEDRIVE% C: %HOMEPATH% \Users\{username} %LOCALAPPDATA% C:\Users\{username}\AppData\Local %LOGONSERVER% \\{domain_logon_server} %PATH% C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths} %PATHEXT% .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc %PROGRAMFILES% C:\Program Files %PROGRAMFILES(X86)% C:\Program […]
To find server uptime: (this works on server 2008 / Vista / Windows 7 & 8 / server 2012) systeminfo | findstr “Boot” Output: System Boot Time: 13/01/2016, 10:59:27 Boot Device: \Device\HarddiskVolume1 The command net statistics server will also provide the server up time, as well as many other related statistics.
Determine which VIBs are installed on the host. esxcli –server=server_name software vib list Install from a URL esxcli –server=server_name software sources vib list –depot=http://web_server/depot_name Install from a local zip file esxcli –server=server_name software sources vib list –depot=path_to_depot_zip_file/depot_ZIP_file Update VIBs from a depot accessible by URL esxcli –server=server_name software vib update –depot=http://web_server/depot_name Update VIBs from a […]