Entries in .Q.l (2)

What does '\l .' or 'system “l ."' do?

Typically, it's used to reinitialize and alert an existing kdb process of a new partition. Note that command triggers the execution of any q scripts existing in the current working directory of the running kdb process.

This command allows kdb to continue running and servicing requests while a new partition is constructed. Running kdb remains unware of the new partition until the \l . command is issued.

See also: .Q.l

How can I have kdb automatically load q code at startup in every session?

Every time you start q, it looks for a file called q.q (in $QHOME, if defined, or current working directory otherwise). If q finds q.q, it will execute it before presenting a prompt or calling any script you provided on the command line.

If you want to call the file something else, or keep it separate from your q installation, you can set the environment variable QINIT to the path to your initialization file.

It is also possible to add k code to q.k (which will be executed before q.q), although we've never needed to.