[NCLUG] I think

Kerry Miller n0wiq at comcast.net
Fri Feb 21 07:48:29 MST 2014


Hello People,

I have written a fresh shell script:

!# /bin/bash

# file: BKusers.sh

cd /home

tar -cvzf /mnt/UserBackup/BK_KerrysStuff.tar.gz kerrym2/KerrysStuff
if [ $? -ne 0 ] then
     echo "BK_KerrysStuff failed"
     exit 1
fi

tar -cvzf    /mnt/UserBackup/BK_MadiesStuff.tar.gz kerrym2/MadiesStuff
if [ $? -ne 0 ] then
     echo "BK_MadiesStuff failed"
     exit 1
fi

tar -cvzf    /mnt/UserBackup/BK_Documents.tar.gz kerrym2/Downloads
if [ $? -ne 0 ] then
     echo "BK_Documents failed"
     exit 1
fi

tar -cvzf    /mnt/UserBackup/BK_Music.tar.gz kerrym2/Music
if [ $? -ne 0 ] then
     echo "BK_Music failed"
     exit 1
fi

tar -cvzf    /mnt/UserBackup/BK_Pictures.tar.gz kerrym2/Pictures
if [ $? -ne 0 ] then
     echo "BK_Pictures failed"
     exit 1
fi

tar -cvzf    /mnt/UserBackup/BK_Videos.tar.gz kerrym2/Videos
if [ $? -ne 0 ] then
     echo "BK_Vidios failed"
     exit 1
fi

tar -cvzf    /mnt/UserBackup/BK_kerrym2.tar.gz kerrym2 \
     --exclude kerrym2/KerrysStuff \
     --exclude kerrym2/MadiesStuff \
     --exclude kerrym2/Documents \
     --exclude kerrym2/Music \
     --exclude kerrym2/Pictures \
     --exclude kerrym2/Videos \
kerrym2
if [ $? -ne 0 ] then
     echo "BK_kerrym2 failed"
     exit 1
fi

echo "BKusers.sh Done"

I think this one will accomplish what I want done but it seem a bit 
brute force.

-- 
Kerry N0WIQ
My web site URL is:
http://mywebpages.comcast.net/n0wiq



More information about the NCLUG mailing list