Tar-ring a directory

Hello

I am trying to tar a whole directory. My problem is that I have to omitt a special subdirectory.
Can you tell my how I am supposed to do that?

Unfortunately I am not very good in regular expressions and in programming. :frowning:

Thanks for any help.

Greetings
Marcus

You can use the X option on tar which will exclude the listed files. Build a "exclude" list inside a text file - you then point to that file when using the X option.

% cat /tmp/myfile.X
./mydir
%
%ls -F
data.dat mydir/ otherdir/
%
% tar cfX /tmp/mytar.tar /tmp/myfile.X ./*
a ./data.dat
a ./otherdir
a ./otherdir/otherdata.dat
%

Read the man page on tar for the X option