Is there a way to print all lines except the last two. I have the below command which prints the last two lines but I need it to print the opposite, everything except the last two lines. The number of lines will always be different but I need it to consistently not print the last two lines. Basically this is to get a listing of files to delete for a certain size and the last two created we didn't want to delete. Thanks.
ls -l | awk '{if ($5 >314572800) print $0}' |tail -2
ls -l | awk '{if ($5 >314572800) print $0}' |tail -2