user1151: I'm using bitcoind on Ubuntu, headless. So there's no GUI to tell me when it's done.
So how do I know?

user18794: The bitcoind command shows different errors now.
The new way to check is with bitcoin-cli getblocktemplate
Scripted use has been posted where I first ran accross this question
How to check if the block chain is up to date using bitcoind or json-rpc?

user26481: Simplest way is to run 
bitcoind -blocknotify myscript.sh %s

On the blocks after bitcoind catches up with the blockchain, your scripts will get called with the new blockhash. You can print a message or do anything else required in this script 

user35577: An alternative method, (working with recent versions), that does not depend on external websites, is to use bitcoin-cli getblockchaininfo and compare the headers field and the blocks field.
Currently, in order to sync the blockchain faster, headers are downloaded before the actual blocks. This is known as Headers-First Sync
As a consequence, the number of block headers during the Initial Block Download (IBD) will be higher than the number of blocks.
When this number "catches up" with the number of blocks, we can say we are "up to date" with the blockchain that our peers advertised to us.
I wrote a script to start bitcoind and outputs dots while still in IBD phase.
When the blockchain is up to date, it will output a message.
Here's the script:
https://github.com/frz-dev/btcutils/blob/master/bitcoin-core/start-bitcoind.sh

user2306: Run bitcoind getblocktemplate. If you're not caught up, then it will come back with an error of -10.

user1171: Run bitcoind getinfo in your shell of choice and compare the block count, listed after "blocks", to the block count listed here. If the two numbers are the same, your client is up to date.

user196: Here's a script doing just that:
echo `bitcoin-cli getblockcount 2>&1`/`wget -O - https://blockchain.info/q/getblockcount 2>/dev/null`


1151: <p>I'm using bitcoind on Ubuntu, headless. So there's no GUI to tell me when it's done.</p>

<p>So how do I know?</p>
 18794: <p>The <code>bitcoind</code> command shows different errors now.</p>

<p>The new way to check is with <code>bitcoin-cli getblocktemplate</code></p>

<p>Scripted use has been posted where I first ran accross this question</p>

<p><a href="https://bitcoin.stackexchange.com/questions/9068/how-to-check-if-the-block-chain-is-up-to-date-using-bitcoind-or-json-rpc/38347#38347">How to check if the block chain is up to date using bitcoind or json-rpc?</a></p>
 26481: <p>Simplest way is to run </p>

<pre><code>bitcoind -blocknotify myscript.sh %s
</code></pre>

<p>On the blocks after bitcoind catches up with the blockchain, your scripts will get called with the new blockhash. You can print a message or do anything else required in this script </p>
 35577: <p>An alternative method, (working with recent versions), that does not depend on external websites, is to use <code>bitcoin-cli getblockchaininfo</code> and compare the <code>headers</code> field and the <code>blocks</code> field.</p>

<p>Currently, in order to sync the blockchain faster, headers are downloaded before the actual blocks. This is known as <em>Headers-First Sync</em>
As a consequence, the number of block headers during the Initial Block Download (IBD) will be higher than the number of blocks.
When this number "catches up" with the number of blocks, we can say we are "up to date" with the blockchain that our peers advertised to us.</p>

<p>I wrote a script to start bitcoind and outputs dots while still in IBD phase.
When the blockchain is up to date, it will output a message.
Here's the script:
<a href="https://github.com/frz-dev/btcutils/blob/master/bitcoin-core/start-bitcoind.sh" rel="nofollow noreferrer">https://github.com/frz-dev/btcutils/blob/master/bitcoin-core/start-bitcoind.sh</a></p>
 2306: <p>Run <code>bitcoind getblocktemplate</code>. If you're not caught up, then it will come back with an error of <code>-10</code>.</p>
 1171: <p>Run <code>bitcoind getinfo</code> in your shell of choice and compare the block count, listed after "blocks", to the block count listed <a href="http://blockexplorer.com/q/getblockcount" rel="noreferrer">here</a>. If the two numbers are the same, your client is up to date.</p>
 196: <p>Here's a script doing just that:</p>

<pre><code>echo `bitcoin-cli getblockcount 2&gt;&amp;1`/`wget -O - https://blockchain.info/q/getblockcount 2&gt;/dev/null`
</code></pre>
