Finds PIDs of all running processes, gets executable binary of each process, and prints containing folder of each binary.
ps -A -o pid | xargs -I pid readlink "/proc/pid/exe" | xargs -I file dirname "file"