Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed expect on my Ubuntu system and cannot find the example code that is supposed to come with it. I searched /usr/lib /usr/bin/lib / luck. I guess it's about time I learned how these things are organized.

Your help is greatly appreciated!

share|improve this question wouldn't want example code in */lib as those directories are for libraries in the "link-to-your-program" sense of the word. – dmckee Jul 15 '11 at 0:25
up vote 5 down vote accepted

Example code on Debian-based systems like Ubuntu is usually stored in /usr/share/doc/<package name>/examples.

For more information about what goes in which directory, check out the Filesystem Hierarchy Standard, which Ubuntu follows for the most part. It's a bit out of date, but a major update is in the works and should be released soon.

share|improve this answer

Use this command

dpkg -L {package}

Generally there are two tools for managing packages in debian systems. apt-get and dpkg.

More information in these links :

share|improve this answer

dpkg -L expect will list the /var/lib/dpkg/info/expect.list file for the package which lists full path of the each of the packages files. You may want to pipe it to less so you can read it.

man hier should give you a description of the file system hierarchy used by Debian. The maintainers tend to be quite religious about following it and will often create symlinks to directories to allow programs that don't follow it to work within their structure.

Documentation goes in /usr/share/doc/<package-name>, so expects documentation will be found in /usr/share/doc/expect. There may be multiple example subdirectories below that, along with other directories which may contain runnable code. man pages go elsewhere, but can be found with the command man -k expect.

For other packages just replace expect in the above commands with the package name.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .