Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.


If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Hide

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for:

Hide

News

2012-05-20 - test
test
2012-05-20 - test
test
2012-05-20 - test
test
2012-05-20 - Test tweets
YU not working?
Hide

Tags

Hide

Functions

Commands using cvs

Commands using cvs from sorted by
Terminal - Commands using cvs - 10 results
cvs -q diff --brief | grep file | cut -d/ -f3- | cut -d',' -f1
cvs up -pA main.cpp | sdiff -s - main.cpp
2011-12-14 04:51:40
User: kev
Functions: cvs sdiff
Tags: cvs
0

you can't reliably use diff against -r HEAD to test whether a file matches the head of the trunk.

cvs -Q status | perl -ne 'print if m/^File.+Status: (?!Up-to-date)/ .. m/^=/;'
2011-12-07 00:33:49
User: dexterp
Functions: cvs perl
0

This will also print the path to file which is not included in the other examples.

cvs checkout -l project/src/
cvs up -r1.23 -p main.cpp | vim -
cvs up 2>&1 | grep --color 'U \|P \|A \|R \|M \|C \|? '
2010-06-30 11:43:06
User: RapazP
Functions: cvs grep
0

Filter output with default cvs update status (not only modified files 'M')

for dir in $(find -type d ! -name CVS); do for file in $(find $dir -maxdepth 1 -type f); do rm $file; cvs delete $file; done; done
2010-04-27 16:03:33
User: ubersoldat
Functions: cvs dir file find rm
Tags: bash cvs delete rm
1

This will search all directories and ignore the CVS ones. Then it will search all files in the resulting directories and act on them.

cvs -n update 2>null | grep -i "M " | sed s/"M "//
cvs update -C
cvs -Q status | grep -i locally