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

[SOLVED] Re: backing up



On 27/05/12 05:18 PM, Ralf Mardorf wrote:
On Sun, 2012-05-27 at 16:51 -0400, Frank McCormick wrote:
On 27/05/12 04:42 PM, Ralf Mardorf wrote:

/etc/gdm3/PostSession/Default

#!/bin/sh
sh ~/a_script
exit 0

/home/user_dir/a_script

#!/bin/sh
cp -R ~/.thunderbird  ~/thunderbird.backup
exit 0

How to check if the file exists is described in the Internet.

Before I go off-line a last hint ;p.

spinymouse@precise:~$ [ -f /etc/fstubby ]&&   echo yes
spinymouse@precise:~$ echo $?
1
spinymouse@precise:~$ [ -f /etc/fstab ]&&   echo yes
yes
spinymouse@precise:~$ echo $?
0
spinymouse@precise:~$ test -f /etc/fstab&&   echo yes
yes
spinymouse@precise:~$ echo $?
0
spinymouse@precise:~$ man test
spinymouse@precise:~$ [ ! -f /etc/fstubby ]&&   echo yes
yes

Hth,
Ralf




    All filed away....you're turning me into a CLI fiend...next thing
I'll be using MUTT :) Well.......not for a while....




Take care that "cp -R" is ok, perhaps you should use "cp -pr".

   Good idea....and I also might add -u..i.e. cp -pru

Thanks
--
Cheers
Frank


Reply to: