In this paper we consider the inverse problem of identifying a linear inclusion inside an elastic body from exterior boundary measurements. Based on the asymptotic formula by Beretta and Francini (2006 SIAM J. Math. Anal. 38 1249-61), we design an effective reconstruction algorithm to find the endpoints and the thickness of a linear inclusion. Numerical experiments show that the algorithm is effective and stable.