Cannot grep /proc, it thinks it is a binary file

[root@localhost ~]# grep systemd /proc/*/cmdline
Binary file /proc/1/cmdline matches
Binary file /proc/461/cmdline matches
Binary file /proc/478/cmdline matches
Binary file /proc/602/cmdline matches
Binary file /proc/610/cmdline matches
Binary file /proc/self/cmdline matches

Solution: Delete the NUL character.

cat  /proc/*/cmdline | tr -d '\000'  | grep systemd
Advertisements

Geek Quotes- In 1989, they thought /etc was a typo

“….I remember a friend of mine telling me that he was drilling holes in the handle of his toothbrush before leaving for a long hiking trip, in order to reduce as much as possible the weight to carry.”

From Cisco Unified Computing System (UCS) (Data Center): A Complete Reference Guide to the Cisco Data Center Virtualization Server Architecture Continue reading