Please check the manual page attr_set(3).