$ tar -cvf file.tar / --exclude "/path/to/directory"
You musn't to write / character and the end of the pattern you would like to exclude.
My blog contains crib sheets about system administration tasks. You will find here some notes about cvs/svn repositories, firewalls, scripting, policies, security. This source of knowledge is very useful for me, I hope you find it useful too.
$ tar -cvf file.tar / --exclude "/path/to/directory"
mysqladmin -u root password NEWPASSWORD
mysqladmin -u root -p oldpassword newpass
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
select * from example into outfile '/tmp/example.csv' fields \
terminated by ',' lines terminated by '\n';
mysql> CREATE TABLE `test` (
-> `fe` VARCHAR( 2 ),
-> `fi` VARCHAR( 2 ),
-> `fo` VARCHAR( 2 ),
-> `fum` VARCHAR( 2 )
-> );
mysql> load data LOCAL infile '/testfile' into table test \
fields terminated by ',' lines terminated by '\n';
aa,bb,aa,rr
re,we,as,qw
ty,qw,as,as
$ rsync -avz --include='*/' --exclude='*' SOURCEDIR DESTDIR
# cd
# mkdir project
# cd project
# cvs2svn --dump-only --dumpfile ./project.dump \
/cvsroot/project/
# svnadmin create /svnroot/project
# svnadmin load /svnroot/project < ./project.dump
# chown -R www-data:www-data /svnroot/project/