man: add documentation for json and pretty flags
Add description for -json and -pretty options. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
a233caa0aa
commit
bff0f25241
4
ip/ip.c
4
ip/ip.c
|
|
@ -54,12 +54,12 @@ static void usage(void)
|
|||
" netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |\n"
|
||||
" vrf | sr }\n"
|
||||
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
|
||||
" -h[uman-readable] | -iec |\n"
|
||||
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
|
||||
" -f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |\n"
|
||||
" -4 | -6 | -I | -D | -B | -0 |\n"
|
||||
" -l[oops] { maximum-addr-flush-attempts } | -br[ief] |\n"
|
||||
" -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n"
|
||||
" -rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}\n");
|
||||
" -rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,9 +48,10 @@ ip \- show / manipulate routing, network devices, interfaces and tunnels
|
|||
\fB\-ts\fR[\fIhort\fR] |
|
||||
\fB\-n\fR[\fIetns\fR] name |
|
||||
\fB\-a\fR[\fIll\fR] |
|
||||
\fB\-c\fR[\fIolor\fR]
|
||||
\fB\-br\fR[\fIief\fR] }
|
||||
|
||||
\fB\-c\fR[\fIolor\fR] |
|
||||
\fB\-br\fR[\fIief\fR] |
|
||||
\fB\-j\fR[son\fR] |
|
||||
\fB\-p\fR[retty\fR] }
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
|
|
@ -208,10 +209,19 @@ Set the netlink socket receive buffer size, defaults to 1MB.
|
|||
print human readable rates in IEC units (e.g. 1Ki = 1024).
|
||||
|
||||
.TP
|
||||
.BR "\-br" , "\-brief"
|
||||
.BR "\-br" , " \-brief"
|
||||
Print only basic information in a tabular format for better readability. This option is currently only supported by
|
||||
.BR "ip addr show " and " ip link show " commands.
|
||||
|
||||
.TP
|
||||
.BR "\-j", " \-json"
|
||||
Output results in JavaScript Object Notation (JSON).
|
||||
|
||||
.TP
|
||||
.BR "\-p", " \-pretty"
|
||||
The default JSON format is compact and more efficient to parse but hard for most users to read.
|
||||
This flag adds indentation for readability.
|
||||
|
||||
.SH IP - COMMAND SYNTAX
|
||||
|
||||
.SS
|
||||
|
|
|
|||
|
|
@ -670,7 +670,8 @@ output raw hex values for handles.
|
|||
|
||||
.TP
|
||||
.BR "\-p", " \-pretty"
|
||||
decode filter offset and mask values to equivalent filter commands based on TCP/IP.
|
||||
for u32 filter, decode offset and mask values to equivalent filter commands based on TCP/IP.
|
||||
In JSON output, add whitespace to improve readability.
|
||||
|
||||
.TP
|
||||
.BR "\-iec"
|
||||
|
|
|
|||
Loading…
Reference in New Issue