From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sanjib Sikder Subject: org back up Date: Wed, 17 Oct 2012 23:55:12 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae93403cf8f042e04cc456684 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOYJW-0005d4-7C for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 14:25:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOYJV-0006mD-05 for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 14:25:54 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:52694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOYJU-0006m9-RH for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 14:25:52 -0400 Received: by mail-ie0-f169.google.com with SMTP id 10so15338552ied.0 for ; Wed, 17 Oct 2012 11:25:52 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --14dae93403cf8f042e04cc456684 Content-Type: text/plain; charset=ISO-8859-1 Hi, I wanted to set a cron job for backing up all my org files as suggested by Suvayu Ali. #!/bin/bash mkdir -p ~/org/backup && \ find $HOME -type f -name '*\.org' ! -path "$HOME/org/backup/*" \ -exec cp -t ~/org/backup/ \{\} \; In Ubuntu I have put the bash file in cron.daily but it seems it is not working. A little googling says I need to give full path for directories. may I modify it like this ? I am not sure about the "find $HOME" part and guess rest of the paths are correct. #!/bin/bash mkdir -p /home/USERNAME/org/backup && \ find $HOME -type f -name '*\.org' ! -path "/home/USERNAME/org/backup/*" \ -exec cp -t /home/USERNAME/org/backup/ \{\} \; Can anybody confirm the correctness of this code? Thanks ----------------------------- *Sanjib Sikder *Ph.D. Fellow Chemical Engineering IIT Bombay* * --14dae93403cf8f042e04cc456684 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I wanted to set a cron job for backing up all my org files as su= ggested by Suvayu Ali.

#!/bin/bash

mkdir -p ~/org/backup && \
find $HOME -type f -name '*\.org' ! -path "$HOME/org/backup/*&= quot; \
=A0=A0=A0=A0-exec cp -t ~/org/backup/ = \{\} \;



In Ubuntu I have put the bash file in cron.daily = but it seems it is not working. A little googling says I need to give full = path for directories. may I modify it like this ? I am not sure about the <= span style=3D"font-size:15px;font-family:Arial;color:#0000ff;background-col= or:transparent;font-weight:normal;font-style:normal;font-variant:normal;tex= t-decoration:none;vertical-align:baseline">"find $HOME" pa= rt and guess rest of the paths are correct.

#!/bin/bash

mkdir -p /home/USERNAME/org/backup && \
find $HOME -type f -name '*\.org' ! -path "/home/USERNAME/org/= backup/*" \
=A0=A0=A0=A0-exec cp -t /home= /USERNAME/org/backup/ \{\} \;


Can anybody confi= rm the correctness of this code?

Thanks
-----------------------------
Sanjib Sikder
Ph.D. Fellow
Chemical Engineering
IIT Bo= mbay




--14dae93403cf8f042e04cc456684--