Re: find -mtime -1 | xargs scp ... user@remote:/dest/path
hi ya
> > find -type f -mtime -1 | tar cvf /tmp/x.tgz -T -
>
> most delightfully cool! and without a great deal of hair, even.
>
> you'd think i might consider tar after all this time, but noooo.
>
> > scp /tmp/x.tgz user@host:dir && "untar it locally and automatically"
> > that shouldnt have any problems w/ "windoze's stYLE file names"
>
> but i think you meant (after double-checking the man pages),
>
> find -type f -mtime -1 -print0 | \
> tar cvf /tmp/$(todaystring).tgz --null -T -
>
> right? don't we still need -print0 and -null for the difficult
> (space-inclusive) filenames?
-print0 -print -ls etc should not be needed ...
also depends on where you are when you run find
if at / or /home or ??
and if you use $DIR in the find command to check just those dirs
> and then i need to figure out the handwaving under "untar it
> locally and automatically"... sounds like a fun wheel to invent!
> (probably use a minutes-delayed crontab, eh?)
hand waiving is fun....
i's ssh into foo machine where that (todaystring).tgz was sent
ssh -l user foo.domain.com
cd $Secret_Dir --> highly depending on original find command
tar zxvfp /path/todaystring.tgz
untarring automatically is easy/dangerous.... and is NOT the
debian way in this case either... ( make a *.deb pkg instead of *.tgz )
- run a cronjob to find new files in /home/To_Install
- if found ... install it && erase it if successful
todaystring can be of the form
date '+%Y%m%d'
Ouputs 20020615 for June 15, 2002
date '+%Y.%m.%d'
Ouputs 2002.06.15 for June 15, 2002
more handwaving...
http://www.Linux-Backup.net
hand waiving because one does not know what directory scheme you used
and which files
c ya
alvin
Reply to: