It's a rather lengthy command, but find can do it:
Code:
find . -maxdepth 1 -type f -newer $( ls -tr | tail -n 5 | head -n 1 ) -exec rm {} \;
That will delete the four most recently modified files. For the original problem of the last 10 files:
Code:
find . -maxdepth 1 -type f -newer $( ls -tr | tail -n 11 | head -n 1 ) -exec rm {} \;
This obviously won't work if there are only 10 files in the directory. In that case though, it makes more sense to use "rm *" because the last 10 modified files are the only files present.
Standard disclaimer: Never, never, never execute any command responsible for moving or deleting files without verifying the command selects the files as you expect. Rip off the "-exec rm {} \;" portion to test until satisfied.