Count duplicate lines
Count how often each line repeats in a file and show the top 20.
sort file.txt | uniq -c | sort -rn | head -20
More linux commands
-
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,UUIDShow disks, partitions and loop devices as a tree with filesystem type, mount point and UUID.
-
blkidPrint UUID, LABEL and TYPE for every block device.
-
mount -t ext4 /dev/sdb1 /mnt/dataMount an ext4 partition to /mnt/data.
-
findmnt --realShow real (non-virtual) mounted filesystems as a tree.
-
mount -o remount,rw /Remount the root filesystem as read-write, for example after a rescue boot.