Rules
- In old UNIX
- Look at
man ps
- Single letters were preferred (-f, -H)
- If a flag includes an argument
- It should follow the flag immediately, space or not
- -U bennett
- -Ubennett
- These could be grouped (-fHUbennett, -fHU bennett)
- But the flag that takes an argument must be the last one.
- ps shows my processes
- ps -f changes the format
- ps -H shows in a heirarchy
- ps -Ubennett shows processes owned by bennett
- ps -f -H -Ubennett
- ps -fHUbennett
- By the way, many programs have specified other arguments as well
- ls takes flags, but files/directories as well.
- ? and - are normally reserved
- ? means help.
- - usually means don't read a file, read standard in.
- This is not a flag, it is usually an argument.
- A more modern version is to use --longname[=value]
- For ps, --User, ie --User=Bennett, or --User bennett
- Also, order doesn't matter that much any more.
- We will use the old way for our programs, "The old ways are the good ways" (JM)