Category: unix
I came across a useful bash alias. I don’t know where. I’ll call it dureport.
alias dureport='du -sdk * | awk '\''{printf "%12d\t%s\n", $1, substr($0,index($0,$2),80)}'\'' |sort -r'
This is more for me than you, however if you need Git on Ubuntu 10.04 (LTS) try this. The commands I ran get the pre-packaged PPA Git working on Ubuntu 10.04:
sudo apt-get install python-software-properties<br /> sudo add-apt-repository ppa:git-core/ppa<br /> sudo aptitude update<br /> sudo aptitude safe-upgrade<br /> sudo aptitude install git
I’ve been struggling to install the beast that is Clearcase 7.1.1 on a proof of concept server.
In this case the server is a Solaris 10 64bit install running on VMware Fusion 3.
One of the initial mistakes I made was to try and run the installation from a network mount. DON’T. Solaris must block the execution of code on some types of removable drives, which in this case was a VMWare Fusion shared folder.
If you use Unix, and need to migrate your Business objects CMS from one database to another database, you will probably use the cmsdbsetup.sh script. This script migrates and manages your database connection in a Unix environment using Business Objects Enterprise (BOE).
In my case I am Using Solaris 9, and have Oracle 10g databases and client files for use by BOE.
When running the cmsdbsetup.sh script you get the following error pertaining to clntsh:
This is a cheat sheet on getting PHP5 on OpenBSD to have zip support. I needed this to get CiviCRM to work with Joomla.
First off install some require packages, including the zziplib package:
<br /> export PKG_PATH=http://mirror.aarnet.edu.au/pub/OpenBSD/4.5/packages/i386/<br /> pkg_add -v zziplib<br /> pkg_add -v autoconf-2.62<br /> Now download and extract the PECL zip package:
<br /> mkdir /usr/local/src/<br /> cd /usr/local/src/<br /> wget http://pecl.php.net/get/zip<br /> tar zxvf zip<br /> cd zip-1.
A mega geeky awk one-liner today. Tested on Solaris under bash, so [YMMV][1].
Have you ever found that a filesystem is filling up fast, and dont know what is causing it? This one liner (which can be placed in a cron job if you like) is best run as a super user.
It will:
Search for all files in the current dir and subdirs that are modified in the last 3 days; list them, filtering just the filesize and name/path; sort/order by the largest file; and Email you a copy of the report.
I’m stuck with a whole bunch of problems getting code to compile and co-operate nicely on my new MacBookPro. I’m compiling my own PHP, but it defaults to compiling for the i386 (32bit) architecure, which then fails when Apache2 running in 64bit mode tries to use the 32bit DSO for PHP5. Compiling PHP5 as 64bit then fails linking against the i386 pgsql lib, and so on. I really need everything using the x86_64 architecture. How does this all relate to readline under Leopard?
This post does not show a successful outcome in case that’s what you where hoping for.
I was trying to get OpenBSD bootstrapped using the PXEBoot NIC in a server. I decided to use my Mac which has tftp and bootpd installed. This post is quite in depth and technical so if you are game then read on.
I’m back with some more tech geek goodness for anyone who uses MySQL and OpenBSD.
OpenBSD by default apache runs in a chroot jail, thereby making it more secure in case the www server is compromised. I have talked about this before.
However if you use wordpress or some other web application that needs MySQL (and I’m talking where apache and MySQL reside on the same host), then the chroot jail will not allow your webapp access to the mysql socket file which is by default located in /var/run/mysql/
I use vim a lot of the time, mostly with splits and diffs, so the following key mappings and functions really helped me with managing the split windows. Maybe they will help you too. (Thanks to the Vim tips wiki for these).
If you use vertical splits, this will help move left and right across the split. Put in your ~/.vimrc
<br /> " Map multi window keys<br /> set wmw=0<br /> " CTRL-H move to left window<br /> nmap <c -h> </c><c -w>h</c><c -w><bar><br /> " CTRL-L move to right window<br /> nmap <c -l> </c><c -w>l</c><c -w><bar><br /> </bar></c></bar></c> When scrolling up and down a window, you can use zz to jump the current line to the middle of the window.