Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Asked
Modified 2 days ago
Viewed 250 times
0

I usually lauch this command:

ps -p 1 --format "command %c running from %t"

But last version in Debian 12, I can't:

ps -p 1 --format "command %c running from %t"
error: improper AIX field descriptor

Uso:
 ps [opciones]

 Try 'ps --ayuda <simple|lista|salida|hilos|varios|todo>'
  or 'ps --ayuda <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).

How can I use literal in --format option of ps, without the use of more complex command line (whitout ps --format ... | awk '{ print ...})

1 Answer 1

2

How can I use literal in --format option of ps, without the use of more complex command line (whitout ps --format ... | awk '{ print ...})

You can't. The only format string permitted is one where the %x format specifiers are separated by zero or more spaces. You could submit a bug report to find out if this is intentional given earlier versions of ps permitted your freetext format string.

Credit: https://lists.debian.org/debian-user/2023/02/msg00537.html

1
  • I think it's a possible bug in Debian. Strings in --format argument are valid in older versions of Debian and also in recent versions of other distributions (fedora).
    Mario Castilla
    –  Mario Castilla
    2023-08-31 09:18:07 +00:00
    Commented Aug 31, 2023 at 9:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.