My task is to count the number of names in a backup file I have made using wc and a pipe, display the first 5 names, then display the last 5 names. I have tested the 'strings' command to view the file, however wc will simply output a never ending blank line.
strings /mnt/tape/backup | wc -l
I am unsure if I should be looking for a specific section of the file. The output should be as follows;
109497
etc/dconf/db/distro.d/locks/10-authconfig-locks
lib
lib64
usr/lib64/libgcc_s-4.8.5-20150702.so.1
usr/lib64/libgcc_s.so.1
usr/lib/systemd/system/anaconda.target.wants/anaconda-nm-config.service
tmp/.X11-unix/X0
tmp/.esd-1000/socket
etc/fstab
root/.cache/abrt/lastnotification
Thank you.