As David Carlisle says, there's no completely automatic way to guess the line width. I suggest you to define a generic macro that you can then adjust for the particular font
\newcommand{\gensqqcup}[3]{% #1 = bar height, #2 = bar thickness, #3 = sidebearings
\ooalign{$\sqcup$\cr
\hskip#3em
\leaders\hrule height #1ex depth \dimexpr -#1ex+#2ex\hfill
\hskip#3em\cr}}
\newcommand{\sqqcup}{\mathbin{\gensqqcup{.4}{.1}{.09}}}
The values in the last line seem appropriate for the Computer Modern fonts

The same values can be used with the MathPazo fonts

I've tried also with the KP fonts and the TX fonts, getting in any case a good result.
The three parameters are
- the bar height (in ex units)
- the bar thickness (in ex units)
- the sidebearings of the square cup (to shorten the bar so that it's inside the symbol)
Usually the default for the bar thickness (0.1ex, which for Computer Modern fonts is approximately 0.4pt) can be a good guess. The \ooalign method avoids the need to guess other parameters.
(Thanks to Jake for pointing out that a relative unit of measure is better for the bar thickness.)
If you want the symbol also in subscript and superscripts, a more convolute definition must be used:
\newcommand{\gensqqcup}[4][\textstyle]{% #2 = bar height, #3 = bar thickness, #4 = sidebearings
\ooalign{$#1\sqcup$\cr
\hskip#4em
\leaders\hrule height #2ex depth \dimexpr -#2ex+#3ex\hfill
\hskip#4em\cr}}
\newcommand{\sqqcup}{\mathbin{\mathchoice
{\gensqqcup[\displaystyle]{.4}{.1}{.09}}
{\gensqqcup[\textstyle]{.4}{.1}{.09}}
{\gensqqcup[\scriptstyle]{.3}{.08}{.07}}
{\gensqqcup[\scriptscriptstyle]{.25}{.07}{.07}}
}}
This is what results from
$a \sqqcup b_{\sqqcup_{\sqqcup}}$

With a bit of trial and error you will find the correct parameters for the three sizes.
$\sqcup$. Are you aware of a command to cut down a symbol? Then I probably could come up with a nice and decent solution. – Stefan Mar 30 '12 at 11:40\smashis your friend I'll add a version to my answer – David Carlisle Mar 30 '12 at 11:42\sqcupin order to solve this problem. – Stefan Mar 30 '12 at 11:57\sqcup2) the rectangle 3) the non-raised one. The comment about\fboxand similar is important indeed! Is there a way to extract half of the symbol directly from the font (it's just a curiosity, not a real question)? – yo' Mar 30 '12 at 13:57