On Tuesday, September 17, 2002, at 03:32 PM, George Kalishkin wrote:

> ��� ������� ���������, �� � �������. ��� ��������� � � ������ ����� ��
> ������ ����� ��� �� �������� � ���������� ��������?
>

if [ "$1" = "" ]; then
         echo "Usage: $0 <target directory>"
         echo "  Backup up a HFS+ root file system to the target 
directory"
         echo "  preserving Mac resource forks and Unix access rights."
         exit 1
fi

if [ $(id -u) -ne 0 ]; then
         echo "$0: you must be root to use this command"
         exit 1
fi

ls -1a / | while read i; do
         case "$i" in
         \.|\.\.|Volumes)
                 ;;
         var|tmp|etc)
                 ln -sf "private/$i" "$1/$i"
                 ;;
         cores)
                 if [ -L /cores ]; then  # Mac OS X up to 10.1.5
                         ln -sf "private/$i" "$1/$i"
                 else                    # Mac OS X 10.2
                         ditto -rsrcFork "/$i" "$1/$i"
                 fi
                 ;;
         mach)
                 ln -sf "/mach.sym" "$1/$i"
                 ;;
         dev)
                 cp -Rp /dev "$1"
                 ;;
         *)
                 ditto -rsrcFork "/$i" "$1/$i"
                 ;;
         esac
done




-----
Machelp; policy & news @ http://www.macrules.ru

Ответить