emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org back up
@ 2012-10-17 18:25 Sanjib Sikder
  2012-10-17 18:41 ` Teemu Likonen
  2012-10-17 19:25 ` Achim Gratz
  0 siblings, 2 replies; 11+ messages in thread
From: Sanjib Sikder @ 2012-10-17 18:25 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

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*

*

[-- Attachment #2: Type: text/html, Size: 2771 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-10-18  0:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 18:25 org back up Sanjib Sikder
2012-10-17 18:41 ` Teemu Likonen
2012-10-17 19:02   ` Sanjib Sikder
2012-10-17 19:08     ` Teemu Likonen
2012-10-17 19:26       ` Sanjib Sikder
2012-10-17 19:41         ` Teemu Likonen
2012-10-17 19:36       ` Nick Dokos
2012-10-17 19:38         ` Sanjib Sikder
2012-10-18  0:14         ` Suvayu Ali
2012-10-17 19:25 ` Achim Gratz
2012-10-17 20:05   ` Russell Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).