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

CVS doesn't list unversioned files in the status output by default, so how can I get a list of all unversioned files? This is the best I've come up with so far:

while IFS= read -r -d '' -u 9
    2>/dev/null cvs status "$REPLY" | >/dev/null grep Unknown && echo "$REPLY"
done 9< <( find . \( -type d -name CVS -prune -false \) -o -type f -print0 )

Surely there must be a simpler way?

share|improve this question
up vote 1 down vote accepted

Found a solution: cvs -qn update

share|improve this answer
I have alias cvss='cvs -nq update', and an alias for cvs -nq update | grep -v '^?' for when I work with people who haven't heard of .cvsignore. And, strictly speaking, the answer to your question is cvs -nq update | grep '^?'. – Gilles Apr 27 '11 at 19:57

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.