Skip to Content

Hello

This is bitNixBlog, welcome! Home of all things about, running on or pertaining to nix systems. If there is something you are trying to do and can't remember, come here, you're likely to find the answer. If it's not here, then post when you find out.

Please register and comment!

Honeypot address

I am just here to publish this address:

user1@zaws.bitnixblog.com

Thanks!

mysqldump of latest 1000 records

Posted in

You can order and limit mysqldump output using the "--where" option. The --where condition below dumps the latest 1000 records from a table.

mysqldump --where="TRUE ORDER BY id DESC LIMIT 1000"

Here are some other examples.

mysqldump --where="TRUE LIMIT 500"
mysqldump --where="mailbox_id=45"
mysqldump --where="mailbox_id=45 AND TRUE ORDER BY id DESC LIMIT 300"

Damn Cool Kernel Feature

Have a look at this post regarding trapping a dying process in the kernel. If you need to trap a process before the process core dumps, read on to the article.

http://timetobleed.com/an-obscure-kernel-feature-to-get-more-info-about-...

Windows + Exchange Torture

I'm obviously a Linux/Zimbra guy, but sometimes I am forced to run lab tests against M$ Exchange since ZCS does integrate with it- sorta. I've been placed under the knife and subjected to Windows torture once again to troubleshoot issues with Exchange F/B integration. I just lost two hours of my life trying to figure out WTF when Exchange 2007 could not connect to the AD domain.

The error:

Active Directory server win.corp.zmb.moc is not available. Error message: A local error occurred.

This server is perfectly sound and has 2 test users.

OS: Windows Server 2008

SSH Through SSH SOCKS Proxy

Posted in

Your SSH client can be configured to connect to any host on an internal network through a SSH SOCKS proxy. This maybe necessary in a corporate environment when:

  • there is one SSH proxy server open to the world;
  • there are a number of hosts on the internal corporate network which only allow connections from trusted or "blessed" internal hosts;
  • you just want to have fun with SSH SOCKS proxy.

OS X WebDAV with Zimbra

Posted in

WebDAV is a great protocol for reading and writing files to and from the Zimbra Collaboration Suite and is a great tool for network file storage since it works inside and outside the home network. Mounting and using your ZCS mailbox WebDAV filesystem with Mac OS X is trivial.

1) Mount your mailbox.

    a. Open Finder
    b. In the Go menu, select "Connect to Server..."
    c. Enter your ZCS server address in the server connection dialog in this format:
      http://server.domain.com/dav/user%40domain.com

Substring Replace Strings In A Filename

This nested for loop substring replaces two parts of the filename GagHstqLEOlv5GU5kEDXmmpAoGQ=257-234.msg1. The script was used to restore missing blobs found in a mailbox backup to the live mailstore.


for d in $(find -type d)
do
  for f in $(ls $d)
  do
    f1=${f/*=}
    f2=${f1/msg*/msg}
    echo "mv -f $d/$f $d/$f2"
  done
done

This site was helpful for figuring this out:
http://tldp.org/LDP/abs/html/string-manipulation.html

Ubuntu Hardy: Install Desktop

I run all my Linux N 2 or N 3, but I needed to test some things with Evolution. Also thought I would have a look at the Ubuntu desktop while I was at it, since Ubuntu server does not install it be default.


$ sudo apt-get install ubuntu-desktop
...
Need to get 475MB of archives.
After this operation, 1903MB of additional disk space will be used.
Do you want to continue [Y/n]? y

Adding A Disk To Ubuntu 8 Hardy For Zimbra

These are the steps for creating a new file system under Ubuntu 8.04 Hardy.

Syndicate content