Scripting in Cron

8 views
Skip to first unread message

Abhijeet

unread,
May 16, 2008, 8:07:48 PM5/16/08
to Linux-Nepal
Greetings,
I need some help on managing my system to automate
creating the folder with folder name similar to system date and move
the content of folder to the newly created folder i.e folder with the
name system date.so i would be more than thankful if i could get any
script to place in cron so that i can do my job efficiently.



regards

avhijeet

Ritesh Raj Sarraf

unread,
May 20, 2008, 3:33:41 PM5/20/08
to Abhijeet, Linux-Nepal

Try a script like this:

#!/bin/bash

mkdir `date +'%F'`

Run this script from a cron job.
To create a cron job, do somethink like this in /etc/cron.d/
@daily root /path/to/the/script


Ritesh
--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

signature.asc
Reply all
Reply to author
Forward
0 new messages