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?