In the first command, I am taking the files with name "abc_*.txt". Since i have used -t in the ls command, the file which is created recently will always come first. Then awk will pass the filenames other than the first record(this is the file we need to retain) to the xargs command to delete.
Second command is also quite similar. ls will take all the files starting with "abc_*.txt" and they are sorted by filename in descending order. The file with the latest timestamp will come first and the tail command will filter the first file(which is the latest) and pass the remaining filenames to the xargs to delete.