update file and add write command for linux.