2
0
Is there a way to prevent or prompt you when trying to cat binary files?
Oftentimes I need to work with log files or data files, some of which are text and others not. It's easy to get mixed up, and accidentally trying to cat a binary file is annoying for obvious reasons.
Ideally I'd want an alias to cat that will prompt you if it detects a file is (with high probability) not plaintext.
its not ideal but using cat -e binary.file will convert all non printing characters and avoid your screen beeping. – rob – 2015-03-17T15:56:41.590