-3

What will be the right cronjob command to move files from x folder to y folder based on a file name keywords? i'm using Debian 6.0 squeeze, and kinda new to cronjobs.

4
  • 2
    Cron jobs are no different than standard shell scripts for the most part. Write a shell script to do what you want and then run it as a corn job.
    – EEAA
    Aug 18, 2012 at 22:14
  • ok..i can do that, only i don't know the correct command for keywords...i need the script to move files that have the word "example" in them (just as an example :)
    – Guy1984
    Aug 18, 2012 at 22:18
  • 2
    We're not here to do your work for you. I'd suggest that you go out and do some of your own research on she'll scripting. When you have done that, come back to us with specific questions you have on the process.
    – EEAA
    Aug 18, 2012 at 22:24
  • I didn't ask for you to do the work for me..i just didn't knew how to call a keyword in a command.
    – Guy1984
    Aug 18, 2012 at 22:28

1 Answer 1

0

You can add into crontab something like:

0 1 * * *   mv  /x/*example*  /y

That pattern is a shell pattern to find more details about this run man bash and search for "Pattern Matching" in the "Pathname Expansion" section.

1
  • Thank you Mircea. thats what i needed to know to go forward, i just didn't knew how to call a keyword.
    – Guy1984
    Aug 18, 2012 at 22:27

Not the answer you're looking for? Browse other questions tagged .