Tag Archives: copy

How to Duplicate a Table in FlameRobin CodeUnit 03 OCT 2011

FlameRobin is a lightweight, cross-platform database administration tool for Firebird databases. It is also NOT one of my favourite tools to use because of its very lightweight nature! Nevertheless, there are times I must use it, and use it I shall, and besides, other people seem to like it, so it’s worth a post or two. Today I’ll quickly jot down a note on how to duplicate a table within FlameRobin.

First, connect to the database instance by selecting it from the explorer window and double clicking on it. Once the table list is loaded, select the table that you wish to duplicate. Click on it to launch a new information window which happens to have the following headers at the top: Summary, Constraints, Triggers, Indices, Privileges, Dependencies and DDL.

Click on the DDL link.

Copy the resulting SQL statement.

Now right click on the Tables menu option in the main FlameRobin window and select the “Create new…” menu option.

Paste the copied SQL into the window, change the table name sections to the duplicate’s desired name, and click on the Run (Play icon) button. Pressing F4 will also cause the statement to execute. If you’re happy with the report, click on the green tick button to commit your transaction, and smile as the table list in the main window magically gets updated with your new table!

Nifty.

Ubuntu: How to Copy a Line in Nano CodeUnit 06 FEB 2011

Nano is an extremely handy and lightweight text editor that comes with most Linux distributions these days. Today’s tip will teach us how to copy and paste a line or piece of text within a text document.

The first method to copy and paste a line of text is to make imaginative use of the existing ctrl+k cut text and ctrl+u uncut text command. Basically you use ctrl+k once to cut the whole line of text you wish to copy, then use ctrl+u to place it back in the place you cut it from and then move the cursor to where you want the text to appear and press ctrl+u once again.

The second method is to make use of the alt+6 key combination to copy the current line into the buffer. Again, the ctrl+u keypress will paste the buffer content’s back into the document. This can be combined with the alt+m+a key combination which first enables mouse support for nano, then allows you to set a mark to indicate the end of the text you wish to copy. Once the mark has been set, alt+6 will copy it and crl+u will paste it.

And now you know. Nifty.

Ubuntu Terminal: “cp: omitting directory” Copy Error CodeUnit 23 DEC 2010

When attempting to copy a non-empty directory in Ubuntu using the cp command, you will be presented with the following error message:

cp: omitting directory mydirectory

To force the copy cp command to handle the non-empty directory correctly, you need to force the recursive switch using -R

So you should be entering:

cp -R mydirectory targetdirectory

And now you know.

TortoiseSVN: How To Strip ALL SVN Folders Out of a Project to Move it Around CodeUnit 29 JUL 2010

TortoiseSVN is actually a pretty damn good Windows subversion client that neatly integrates itself within the Window shell.

The tortoiseSVN question for today is how to I get a clean copy of one of my projects under subversion, in other words how do I get a folder with all that extra hidden SVN gunk of .svn folders and files?

Well the answer comes in the form of TortoiseSVN’s rather neat and often forgotten right-click context menu export function.

First, locate the folder you wish to get a clean copy of. Next, right-click on the folder and browse down on the TortoiseSVN context menu until you reach the Export menu function.

Clicking this will launch a dialog asking you to select a folder to export to. Once you’ve done that, the system will begin copying over your working copy folder to the newly specified folder, sans all that extra SVN junk.

Nifty.