klayout a.oas -s b.oas Trying to use the "generic option" "save only visible layer" doesn't work with "save all". One has to use "save as" for both layouts.