strip some paths got from commands