Operating Systems

A technician must save a one-time list of every process from all users, with each PID and owner, to a text file. Which command should be run?

Show the answer

Correct answerC. ps aux > procs.txt

AWhy not this: Plain ps shows only the current shell's processes, so it omits other users' processes.

BWhy not this: du reports disk space used by files and directories, not running processes.

CWhy this is right: ps gives a static snapshot, and aux adds every user's processes with the owner and PID columns.

DWhy not this: top is a continuously refreshing display, not a one-time snapshot suited to a file.

ps prints a one-time snapshot of processes, and the aux options extend it to all users with owner and PID, so it redirects cleanly to a file. Plain ps lists only processes from the current terminal session, so it misses other users' processes.