Remove leading directory components from a path, like tar's --strip-components option