Tag: procfs
-
comparing /proc/12345/cmdline on Linux — “diff –text” vs “diff –brief –text” vs “cmp –silent”
https://en.wikipedia.org/wiki/Procfs#Linux A cmdline “file” contains NUL characters, so “diff” needs to be used with “–text” otherwise it will fail anyway. I chose process ID 12345 deliberately, it is just a placeholder. $ cp /proc/12345/cmdline $HOME/cmdline $ ll /proc/12345/cmdline ~/cmdline -r–r–r– 1 root root 0 2018-06-12 09:22:50 /proc/12345/cmdline -r–r–r– 1 user users 45 2018-06-12 09:48:19 /homes/user/cmdline #…