copied some utilities from mac-prof to common unix