Home > Archive > Linux/Unix > December 2003 > Terminal QOD for 12-9-03





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Terminal QOD for 12-9-03
Papiya

2003-12-09, 11:24 am

1. How do you check in a file using RCS version control?

A. vi foo.c
B. ci foo.c
C. co foo.c
D. xargs foo.c

2. You try to install a program from the source code and when you type:

# make

nothing happens. The text of your Makefile is below:

code:
# Makefile for foo # $Log$ foo: foo.c foo.o cc -o fun fun.c


What could be the problem? Choose two answers.

A. Your rule does not begin with a tab character.
B. There is a space charcater after your second dependency file.
C. Object files cannot be included in dependencies.
D. You are using the wrong compiler.
mindmesh

2003-12-09, 11:42 am

a & d
Papiya

2003-12-09, 11:46 am

quote:
Originally posted by mindmesh
a & d


Sorry, guess again.
mindmesh

2003-12-09, 11:51 am

quote:
Originally posted by Papiya
Sorry, guess again.


b & c
Papiya

2003-12-09, 11:54 am

1. B
2. A & B.

To check a file into an RCS directory you use the "ci" command. To check it out of RCS revision control, you use the command "co" ("co -l" to unlock the file for editing as well).

All rules in makefile must begin with tab charcaters (not spaces) and no line cannot end with a space.
mindmesh

2003-12-09, 12:35 pm

Hate to show off my newbie'ness but what is an RCS directory?
Papiya

2003-12-09, 12:46 pm

RCS is a source revision control software package that comes with most Linux distros. It allows you to track your changes to software when multiple programmers are collaborating on a project. When you write a program, add a comment like this:

/* $Log$ */
#include <stdio.h>
int main(void)
{
printf("Hello, World!\n");
return (0);
}

In the same directory as the source, create a subdirectory called RCS. Then when you are finished doing your edits, you "check in" your finished program by issiuing:

$ ci hello.c

You'll get a prompt back like this:

RCS/hello.c,v <-- hello.c
enter description, terminated with single '.' or end of file:
NOTE: This is NOT the log message!
>>

Enter a single period to get out of this. Now take a look in that RCS directory and you should now see a file with an weird name like:

hello.c,v

If you look at this file it looks like a lot of RCS gibberish and something that looks like your original file. To check the file out you use:

$ co hello.c

But using this method, the file is still locked. To unlock it for yourself (and lock it to others) use:

$ co -l hello.c

Then you can re-edit the file. After the RCS tag "$Log$", you'll have the revision level. You can use the "rlog" and "rcsdiff" commands to view the RCS history and show the difference between your current file and the last one checked in, respectively.

Unlike CVS, this is best used where the programmers are centrally located and not distributed through a wide geogrpahic region.
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net