Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Feb 1997 16:37:22 -0600 (CST)
From:      "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
To:        freebsd-hackers@freebsd.org, y.lin@larc.nasa.gov
Subject:   Re: Where is FreeBSD source code
Message-ID:  <199702192237.QAA14470@iworks.InterWorks.org>

next in thread | raw e-mail | index | archive | help

> I am looking for source code of user commands (e.g. ls, rm,...). I looked in
> 2.1.5-RELEASE/src directory. Is this the correct directory? 
> Wouldn't it be nice if you have description of all the subdirectories in
> the top dir (e.g. 2.1.5-RELEASE) so people can know which dir contains what?

Well, if you know where the ls and rm programs reside in an installed
system...

  bash$ which rm
  /bin/rm
  bash$ which ls
  /bin/ls

Then, if you're still not sure...

  bash: man hier

  [ cut ]

     /usr/    contains the majority of user utilities and applications

              bin/      common utilities, programming tools, and applications
  [ more cut ]

              src/      BSD and/or local source files

                        bin/         src for files in /bin
                        contrib/     src for files in /usr/contrib
                        etc/         src for files in /etc
                        games/       src for files in /usr/games
                        include/     src for files in /usr/include


And if you don't have a FreeBSD system handy, then grab the files
sbin.a?, cat them together, and untar/gzip them.

As an alternative, you can grab the necessary files from the -stable or
-current trees where they are not kept as tarballs:

ftp> ls rm
227 Entering Passive Mode (204,120,255,178,4,59)
150 Opening ASCII mode data connection for /bin/ls.
total 32
-r--r--r--  1 root  root    176 Apr 13  1995 Makefile
-r--r--r--  1 root  root   4826 Jun  4  1996 rm.1
-r--r--r--  1 root  root  10196 Jun  4  1996 rm.c
226 Transfer complete.
ftp> pwd
257 "/pub/Mirrors/FreeBSD/FreeBSD-stable/src/bin" is current directory.

Dan Eischen
deischen@iworks.InterWorks.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702192237.QAA14470>