Tar archive problems.

Nathan Aubrey nathan at paysonlinux.org
Fri Oct 26 11:08:18 MST 2007


I have a set of files that are lists of files in my filesystem. I run backups 
against these scripts doing something like this...

#!/bin/bash
copy_contents() {
(tar -cpf - "$i" | tar -f - -xpC /tmp/filearchive.1)
}

while read i ; do
      if ! [ -d "$i" -a -e "$i" ]; then
         copy_contents 1>/dev/null 2>/dev/null
      fi
      done < file_list.1

It works great, but I have several empty directories that are not backed up, 
but I would like them to be backed up as files go in them temporarily, but I 
have to manually add those empty directories. How can I do the above but 
include the empty directories?



-- 
~~~~~~~~~~~~~~~~~~~~~
Nathan Aubrey
Information Security & Web Development
PaysonLinux Developer
http://www.paysonlinux.org/
Because Windows Sucks


More information about the PLUG-discuss mailing list