HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gc — Count nodes, edges, connected components, or clusters in Graphviz `.dot` files. More information: <h

Submitted by: @import:tldr-pages··
0
Viewed 0 times
connectedcommandgcclicomponentscountedgesnodes

Problem

How to use the gc command: Count nodes, edges, connected components, or clusters in Graphviz .dot files. More information: <https://graphviz.org/pdf/gc.1.pdf>.

Solution

gc — Count nodes, edges, connected components, or clusters in Graphviz .dot files. More information: <https://graphviz.org/pdf/gc.1.pdf>.

Count nodes and edges in a file:
gc {{path/to/file.dot}}


Count only [n]odes:
gc -n {{path/to/file.dot}}


Count only [e]dges:
gc -e {{path/to/file.dot}}


Count [c]onnected components:
gc -c {{path/to/file.dot}}


Display help:
gc -?

Code Snippets

Count nodes and edges in a file

gc {{path/to/file.dot}}

Count only [n]odes

gc -n {{path/to/file.dot}}

Count only [e]dges

gc -e {{path/to/file.dot}}

Count [c]onnected components

gc -c {{path/to/file.dot}}

Display help

gc -?

Context

tldr-pages: common/gc

Revisions (0)

No revisions yet.