Why not let the shell do the work? ls -lf _* [!_]* The `-f` is required to make `ls` not sort the output.