Here's the relevant passage from O'Brian:
'Forgive me, sir,' said Jack, rising, 'but there is still the question of hands: I am short, very far short, of my complement. And then of course there is the chaplain.'
'Hands?' exclaimed the Admiral, as though this were the first he had ever heard of the matter. 'What do you expect me to do about them? I can't bring me out of the ground, you know. I am not a goddam Cadmus.'
'Oh no, sir,' cried Jack with the utmost sincerity, 'I never thought you were.'
'Well,' said the Admiral, somewhat mollified, 'come and see me tomorrow.'
...Allen and his new captain walked out into the street. 'I shall see you tomorrow, then, Mr Allen?' said Jack, pausing on the pavement. 'Let it be early, if you please.'...
Now that they were out in the open, surrounded by quantites of people and talking about subjects of reat importance to them both, such as the ship's tendency to gripe and the probable effects of doubling her, Allen's constraint wore off, and as they walked along towards the ship he said, 'Sir, may I ask what a Cadmus might be?'
'Why, as to that, Mr Allen,' said Jack, 'it might not be quite right for me to give you a definition in such a public place, with ladies about. Perhaps you had better look into Buchan's Domestic Medicine.'
|Cadmus, sowing dragon's teeth, creates an army|
It's the same joke--someone's trying to cover up their ignorance by pretending to be unwilling to say something not fix for mixed company. I don't necessarily assert that O'Brian intended to borrow this idea from Dickens; I doubt it was a conscious theft. But O'Brian--as erudite and learned an author as any I know--had undoubtedly read Dickens. That idea, that set-up for a joke--if you want to call it that--had stuck in his head. The pleasure of finding that connection, of seeing an idea passed form one hand to the next, is one of the great joys that reading, and especially _rereading_ offers. (Only because I've read all of the O'Brian books a dozen times was I able to associate the two moments, reading Our Mutual Friend.)