Skip to main content

procfs Enumeration Pretty Output

Outputs in procfs are separated by null bytes, thus we useĀ tr to translate to new line.

find /proc -name environ -exec sh -c "cat {} | tr '\0' '\n'" \; 2>/dev/null | sort -u
find /proc -name cmdline -exec sh -c 'tr "\0" " " < "$1"; echo' _ {} \; 2>/dev/null | grep -v '^$' | sort -u