function like Linux command