Posted on December 30, 2011, 4:12 pm, by Rhys, under
Bash,
Linux.
Working with multiple computers in Powershell is absurdly easy using the Get-Content cmdlet to read computer names from a text file. It’s as easy as this… ?View Code POWERSHELL$a = Get-Content "C:\Scripts\Test.txt" foreach ($i in $a) {$i + "`n" + "=========================="; Get-WMIObject Win32_BIOS -computername $i} As I’m doing more and more bash scripting I thought [...]
Posted on January 25, 2011, 9:00 pm, by Rhys, under
DBA,
Linux,
MySQL.
Today I wanted a quick and easy way to generate a backup of the structure of all MySQL databases in one easy hit. Here’s a couple of ways you can do this with the tools you’re likely to find everywhere. Firstly, we can use the following query to generate a list of mysqldump commands. The [...]
Posted on December 14, 2010, 9:11 pm, by Rhys, under
DBA,
Linux,
MySQL.
Unfortunately the MySQL SELECT INTO OUTFILE command doesn’t support an option to output the headers of the result set you are exporting. A feature request has been open for over 2 years to sort this with no apparent activity. A few people have had the idea of using a UNION ALL to include the headers [...]
Posted on May 18, 2010, 7:34 pm, by Rhys, under
DBA,
Linux.
Now I’m working mainly with Linux and MySQL I’ve had to learn how to accomplish basic tasks in entirely new ways. As a DBA I like to keep an eye on disk space. I wanted something like my Check disk space with Powershell script, but this only works with Windows, so naturally I turned to [...]