tar cvf hoge.tar ./hoge --exclude fuga
これだと、./hogeディレクトリのfuga以外をtarにする。
echo fuga > exclude echo piyo >> exclude tar cvf hoge.tar ./hoge -X exclude
これでfuga、piyo以外をtarにする。