Is there a simple shell command/script that supports excluding certain files/folders from being archived?
I have a directory that need to be archived with a sub dire
Use the find command in conjunction with the tar append (-r) option. This way you can add files to an existing tar in a single step, instead of a two pass solution (create list of files, create tar).
find /dir/dir -prune ... -o etc etc.... -exec tar rvf ~/tarfile.tar {} \;