Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best backup option for spanning CDR's?



Well, there is the obvious way:

$ if [ "`file -b /etc/motd`" == 'text' ] ; then echo YES ; fi
YES

This actually does what you want:

$ for TESTFILE in `find / -size '-300k'` ; do if [ "`file -b "$TESTFILE" |
grep -c -etext -`" -ge 1 ] ; then echo "$TESTFILE" YES ; fi ; done

Obviously, replace 'echo "$TESTFILE" YES' with something more useful.

On an ideally organized distribution, you should be able to depend upon
configuration files being in /etc, other system variable files being in
/var, and user variable files being in /home (or /root).  In general,
/bin, /usr, and /sbin should contain nothing specific to your system,
usually under package management and therefore easily reinstallable.

-- Mike


On 2000-12-10 at 22:01 -0500, David Kramer wrote:

> As a side question, is there an easy way to tell whether a file is an
> ASCII text file as opposed to a binary?  One backup option I am
> contemplating would be to back up all text files under 300K or so, which
> would encompass most if not all configuration files.  In other words,
> back up only what I would need to make a new install work like the old
> system, given I would most likely install the OS fresh after a crash
> anyway.


-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org