Toggen Blog
Tech tips
Articles
Latest
seLinux – Mordac the Preventer of Information Services
The Problem: I was trying to do a mkdir using php in a cakephp file upload script and I got an error: 2011-10-18 21:55:48 Warning: Warning (2): mkdir() [http://php.net/function.mkdir]: No such file or directory in [/home/user/public_html/mapdb-dev/app_controller.php,...
CakePHP change a view to have an image upload field in it
# add array('type'=>'file') to the Form->create method < ?php echo $this->Form->create('Map', array('type'=>'file'));?> < ?php __('Add Map'); ?> < ?php # most fields are just normal automagic text/numeric/boolean fields echo $this->Form->input('name'); echo...
awk specifying multiple field separators
I want to extract the text "Windows 2008" sandwiched between [VM STORE] and "/Windows 2008.vmx" So I need two field separators ] for the left and / for the right. So for awk I use "[]/]" as the argument to -F. Then I need to trim the spaces using sed. echo "32 EDI...
Busybox ash shell workaround for not working IFS on VMWare 4ESXi
This doesn't work ~ # cat fstest.sh #!/bin/sh ALLFILES=`ls -1 "/vmfs/volumes/4c371e81-0c463360-dfe3-001d091edb9f/ERP WinXP Client/"` # I tried all sorts of things but this works with # the vmware busybox (ash) shell # this works you get correct field separation...
Splitting records by multiple spaces but not single spaces using awk
The default field separator on awk is one or more spaces so for the following vmware command output if you try to awk out a VM name which has spaces you get the first word of the VM name and not the full name. To fix you need to change the field separator in awk to...
OpenSuse 11.4 on HP Mini 110 – It works!
Talk about drama free install. Download the KDE LIVE ISO http://mirror.optus.net/opensuse/distribution/11.4/iso/openSUSE-11.4-KDE-LiveCD-i686.iso dd if=openSUSE-11.4-KDE-LiveCD-i686.iso of=/dev/sde bs=8M Where /dev/sde is my 4GB USB Key. Press F10 on the HP Mini 110...
