[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fetching path from ps-or-proc.



Good time of the day.


Please help me to fix my problem. I will start w/ its description.

I need to fetch a file path. I can do so by:

. ps -AHf | grep [...] (as it is visible from command parameters)

. cat /proc/n/cmdline (same command arguments)

Problem is that as the path contains UTF-8 char.s for unknown to me
reason one char. in the whole path is represented w/ '?' char. - in
case I fetch the path using 'ps' command. Whereas fetching it
from /proc - I get the path in int purity.

My questions are:

. why only one char. is represented w/ '?' - and not all of them?

. I use utf-8 env. how I can fetch the path using 'ps' command?

That's it.

Thanks for Your time and answer.


Reply to: