Adapted lstmap to linux