handle osx, linux for ls