[Top][All Lists]

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

[O] org back up

From: Sanjib Sikder
Subject: [O] org back up
Date: Wed, 17 Oct 2012 23:55:12 +0530


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


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.


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?

Sanjib Sikder
Ph.D. Fellow
Chemical Engineering
IIT Bombay

reply via email to

[Prev in Thread] Current Thread [Next in Thread]