Thanks for the replies both
| What's the end goal? Curiosity, or something more substantial than that? There's often/always a better way. |
Basically I don't have a massive HDD - 4.3GB. I'm just trying to clean up my system and remove old stale and duplicate files!
I'm new to FreeBSD (love it by the way
) and have experimented and tried various things along the way - some have been totally wrong
I've recently been playing with upgrading things links openssl and openssh (which are obviously part of the base system). I didn't know about things like:
make -DOPENSSL_OVERWRITE_BASE install clean
until recently. Through my own clumsiness I moved all of the man files for the openssl port (didn't overwrite base install) into /usr/local/man. Anyway I ended up having a lot of duplicate man pages.
A friend of mine is a lot better than me at bash scripting (I score a 0
at bash scripting tbh) and came up with this script:
find /usr | sed s#.*/##g | sort | uniq --invert > duplicate_files
which lists all duplicate filenames within the /usr directory (ps - there are a lot!)
A start towards my problem would probably be to list all duplicate man pages.
I'm sure modification of the above bash script could be the solution?
Many thanks for your help