Sanjib Sikder [2012-10-18 00:56:46 +0530] wrote:

> I do not find personal crontab file. how do I create it ? crontab -e says
> my personal file is not there

With "crontab -e" in Debian system.

> If I want to run it as root then how do modify the following code as
> it is nor working ..

You should probably read the manual page of "find" and learn all the
relevant options. But here's my new version which uses full paths.


#!/bin/sh

dir=/home/USERNAME
target=$dir/org/backup

mkdir -p "$target" && \
        find "$dir" -type f -name '*.org' ! -path "$target/*" \
        -exec cp -t "$target" {} +

Reply via email to