  We study the problem of searching for a fixed path
$\epsilon_0\epsilon_1\cdots\epsilon_l$ on a network through random walks. We
analyze the first hitting time of tracking the path, and obtain exact
expression of mean first hitting time $\langle T \rangle$. Surprisingly we find
that $\langle T \rangle$ is divided into two distinct parts: $T_1$ and $T_2$.
The first part $T_1 =2m\prod_{i=1}^{l-1}d(\epsilon_i)$, is related with the
path itself and is proportional to the degree product. The second part $T_2$ is
related with the network structure. Based on the analytic results, we propose a
natural measure for each path, i.e. $\varphi=\prod_{i=1}^{l-1}d(\epsilon_i)$,
and call it random walk path measure(RWPM). $\varphi$ essentially determines a
path's performance in searching and transporting processes. By minimizing
$\varphi$, we also find RW optimal routing which is a combination of random
walk and shortest path routing. RW optimal routing can effectively balance
traffic load on nodes and edges across the whole network, and is superior to
shortest path routing on any type of complex networks. Numerical simulations
confirm our analysis.
