# Why is there no source code for gpart in usr/bin or usr/sbin? Where can I find it?



## ahev (Mar 22, 2020)

From this page https://www.freebsd.org/cgi/man.cgi?gpart(8) one may suppose that gpart is in the ports collection. So why does this command `find . -name "*gpart*"`  not find anything when run in the root of the source tree?


----------



## trev (Mar 22, 2020)

```
$ locate gpart
/rescue/gpart
/sbin/gpart
/usr/obj/usr/src/amd64.amd64/lib/geom/part/gpart.8.gz
/usr/obj/usr/src/amd64.amd64/usr.sbin/bsdinstall/partedit/.depend.gpart_ops.o
/usr/obj/usr/src/amd64.amd64/usr.sbin/bsdinstall/partedit/gpart_ops.o
/usr/ports/graphics/kdegraphics-svgpart
/usr/ports/graphics/kdegraphics-svgpart/Makefile
/usr/ports/graphics/kdegraphics-svgpart/distinfo
/usr/ports/graphics/kdegraphics-svgpart/pkg-descr
/usr/ports/graphics/kdegraphics-svgpart/pkg-plist
/usr/ports/sysutils/gpart
/usr/ports/sysutils/gpart/Makefile
/usr/ports/sysutils/gpart/distinfo
/usr/ports/sysutils/gpart/files
/usr/ports/sysutils/gpart/files/patch-inst.defs
/usr/ports/sysutils/gpart/files/patch-make.defs
/usr/ports/sysutils/gpart/files/patch-man-gpart.man
/usr/ports/sysutils/gpart/files/patch-src-disku.c
/usr/ports/sysutils/gpart/files/patch-src-gm__bsddl.h
/usr/ports/sysutils/gpart/files/patch-src-gm__ntfs.h
/usr/ports/sysutils/gpart/files/patch-src-gpart.c
/usr/ports/sysutils/gpart/files/patch-src-gpart.h
/usr/ports/sysutils/gpart/files/patch-src_l64seek.h
/usr/ports/sysutils/gpart/pkg-descr
/usr/share/man/man8/gpart.8.gz
/usr/src/lib/geom/part/gpart.8
/usr/src/usr.sbin/bsdinstall/partedit/gpart_ops.c
```


----------



## ahev (Mar 22, 2020)

trev said:


> ```
> $ locate gpart
> /rescue/gpart
> /sbin/gpart
> ...


Is it from your installation? I wondered if there is source code for it here https://github.com/freebsd/freebsd


----------



## acheron (Mar 22, 2020)

ahev said:


> From this page https://www.freebsd.org/cgi/man.cgi?gpart(8) one may suppose that gpart is in the ports collection. So why does this command `find . -name "*gpart*"`  not find anything when run in the root of the source tree?


/usr/src/lib/geom/part/geom_part.c


----------



## ahev (Mar 22, 2020)

acheron said:


> /usr/src/lib/geom/part/geom_part.c


Oh, I found it


----------

