Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 am taking a Red Hat exam that is offline. I am having issues remembering the syntax for an RPM SPEC file.

Can anyone suggest how to retrieve an example or some documentation that should already be in the system? Cannot seem to find anything like that.

(This is not cheating. We are allowed to use anything on the system.)

share|improve this question
Yes, but you should already know how to find any documentation on the system. – Shawn J. Goff Oct 13 '11 at 22:53
@Shawn, I do but does not hurt to ask for tips. There has been a few times where I found nice examples by chance. Please, give your suggestion below. :-) – Belmin Fernandez Oct 14 '11 at 0:50
up vote 2 down vote accepted

If you run emacs foo.spec that will create a spec file with the basic layout. That is part of the emacs-common package which will hopefully be installed. If you don't know emacs, just run that command, hit ctrl+x+s to save it then ctrl+x+c to exit then you can open the spec in your favorite editor.

CentOS 5 has /usr/share/doc/rpm- which contains some basic info. It comes with the rpm rpm which should be installed on any server. CentOS 6 will have something installed in a similar location.

If you poke around /usr/lib/rpm there might be useful stuff in there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.