6. Given a positive integer $n$. Let $x_{1}, x_{2}, \cdots, x_{2 n}$ be a permutation of 1, $2, \cdots, 2 n$, and
$$
\left|x_{i}-i\right|=1(i=1,2, \cdots, 2 n)
$$

holds. Then the number of such permutations is $\qquad$
6. 1 .

From the given information, we have
$$
\begin{array}{l}
x_{i}=i-1 \text { or } i+1 . \\
\text { Then } x_{2 n}=2 n-1 \Rightarrow x_{2 n-2}=2 n-3 \\
\Rightarrow \cdots \Rightarrow x_{2}=1, \\
x_{1}=2 \Rightarrow x_{3}=4 \Rightarrow \cdots \Rightarrow x_{2 n-1}=2 n .
\end{array}
$$

Therefore, such an arrangement is unique.