get cmd last