delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.4 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <30494313.post@talk.nabble.com> |
Date: | Sun, 19 Dec 2010 11:33:28 -0800 (PST) |
From: | jwzumwalt <jwzumwalt AT neatinfo DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Script to save XP Win stuff |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
I thought I would share a script I use to save my important personal and config files. I hope this helps! #!/bin/bash # Pretty ANSI writing OFF="\033[0m" BOLD="\033[1m" DIM="\033[2m" RED="\033[1;31m" GREEN="\033[1;32m" YELLOW="\033[1;33m" BLUE="\033[1;34m" dir_name="personal_backup_`date +%Y-%m-%d_%H.%M.%S`" mkdir /cygdrive/f/$dir_name mkdir /cygdrive/f/$dir_name/cygwin START_TIME=`date +%s` # start time echo -en "\n\t Start time:\t $GREEN`date +%Y-%m-%d_%H.%M.%S`$OFF\n" # screen echo "Start time: `date +%Y-%m-%d_%H.%M.%S`" > /cygdrive/f/$dir_name/logfile.txt # log file cp -R "/cygdrive/c/crash" /cygdrive/f/$dir_name cp -R "/cygdrive/c/xampp/htdocs" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/root/Application Data/Thunderbird" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/root/Application Data/Notepad++" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/root/Application Data/ieSpell" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/root/Application Data/Mozilla" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/All Users/Favorites" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/root/Favorites" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/root/My Documents" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/root/Templates" /cygdrive/f/$dir_name cp -RP "/cygdrive/c/Documents and Settings/root/Desktop" /cygdrive/f/$dir_name cp -R "/cygdrive/c/Documents and Settings/root/Cookies" /cygdrive/f/$dir_name cp -R /home/root/bin /cygdrive/f/$dir_name/cygwin cp -R /home/root/scripts /cygdrive/f/$dir_name/cygwin cp -R /home/root/.bash_profile /cygdrive/f/$dir_name/cygwin cp -R /home/root/.bashrc /cygdrive/f/$dir_name/cygwin cp -R /home/root/.inputrc /cygdrive/f/$dir_name/cygwin cp -R /home/root/.profile /cygdrive/f/$dir_name/cygwin cp -R /etc/DIR_COLORS /cygdrive/f/$dir_name/cygwin cp -R /etc/X11/xinit/xinitrc /cygdrive/f/$dir_name/cygwin END_TIME=`date +%s` # used to calculate elapsed time # end time echo -en "\t End time:\t $YELLOW`date +%Y-%m-%d_%H.%M.%S`$OFF\n" # screen echo "End time: `date +%Y-%m-%d_%H.%M.%S`" >> /cygdrive/f/$dir_name/logfile.txt # log file ELAPSED_MINUTES=`echo $((($END_TIME-$START_TIME)/60))` # elapsed time echo -en "\t Elapsed minutes: $BLUE$ELAPSED_MINUTES$OFF\n\n" # screen echo "Elapsed minutes: $ELAPSED_MINUTES" >> /cygdrive/f/$dir_name/logfile.txt # log file -- View this message in context: http://old.nabble.com/Script-to-save-XP-Win-stuff-tp30494313p30494313.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |