Это старая версия документа!
Tar - исключаем файлы и списки исключений
tar -cvfpj –exclude=~/My_Music tarFile.bz2 /home/evan/ tar -cvfpj tarFile.bz2 –exclude=~/My_Music /home/evan/ tar -cvfpj tarFile.bz2 –exclude=~/My_Music /home/evan/ tar -cvf –exclude=~/My_Music tarFile.tar /home/evan/
# quoting the exclude paths: tar -cvfpj –exclude=«~/My_Music» tarFile.bz2 /home/evan/ tar -cvfpj tarFile.bz2 –exclude=«~/My_Music» /home/evan/ tar -cvfpj tarFile.bz2 –exclude=«~/My_Music» /home/evan/ tar -cvf –exclude=«~/My_Music» tarFile.tar /home/evan/
# not using ~ character in exclude paths: tar -cvfpj –exclude=«/My_Music» tarFile.bz2 /home/evan/ tar -cvfpj tarFile.bz2 –exclude=«/My_Music» /home/evan/ tar -cvfpj tarFile.bz2 –exclude=«/My_Music» /home/evan/ tar -cvf –exclude=«/My_Music» tarFile.tar /home/evan/
# not using ~ character and not quoting the exclude paths: tar -cvfpj –exclude=/My_Music tarFile.bz2 /home/evan/ tar -cvfpj tarFile.bz2 –exclude=/My_Music /home/evan/ tar -cvfpj tarFile.bz2 –exclude=/My_Music /home/evan/ tar -cvf –exclude=/My_Music tarFile.tar /home/evan/
#creating an exclude list file and referencing that tar -cvfX ~/scripts/EXCLUDE_list tarFile.tar /home/evan/ tar -cvf –exclude-from ~/scripts/EXCLUDE_list tarFile.tar /home/evan/ tar -cvf –exclude-from=~/scripts/EXCLUDE_list tarFile.tar /home/evan/ tar -cvf –exclude-from=«~/scripts/EXCLUDE_list» tarFile.tar /home/evan/ tar -cvf –exclude-from=$HOME/scripts/EXCLUDE_list tarFile.tar /home/evan/
#contents of the EXCLUDE_list file have taken many forms - # none have appeared to have any effect.
# version 1 /My_Music/
# version 2 /My_Music
# version 3 My_Music
# version 4 - trying to isolate file types *.mpg *.mp3 *.m4a