On Sun, Nov 04, 2018 at 07:29:53AM -0800, pe...@easthope.ca wrote: > How is this for archiving the content of a directory? > > pushd <aDirectory> ; > printf "Insert blank DVD-R."; read t ; > tar -vcpzf - * | xorriso -indev /dev/sr0 -add -- -commit ;
Be aware that the * glob will probably miss filenames beginning with a dot. Since you're using pushd, which is a bash extension, this is probably a bash script. Therefore you might consider using shopt -s dotglob inside the script, to make the * glob include "dot files". That's assuming you want to retain the current archive appearance. The alternative would be to use . instead of * as tar's starting point. This would change your archive appearance from .bashrc bin/foo lib/libbar.a to ./.bashrc ./bin/foo ./lib/libbar.a