Uncategorized Print Only Duplicate Lines Linux : And when they do, there's little need to spend an afternoon working up a filter for them, when the uniq command is at your very what if you wanted to make your job a little easier and display, say, only the unique or duplicate lines? Explains how to sort and remove duplicate lines from a text file under unix / linux operating system using sort how do i remove all duplicate lines from a text file under gnu/linux?