Surface effects and local structure of a one-dimensional system