I've supposed to archive a directory with tar and exclude some files. I have a directory $HOME/java which includes some .java and .class files. What I want to do is exclude all .class files using the -X exclude option.
I've created an Exclude file by using find
$ find $HOME/java -name "*.class" > Exclude
Then tried to archive the directory
$ tar -cvfX java.tar Exclude $HOME/java
But somehow it does not do the exclude. The tar version on Solaris does not support exclusion by name.