LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-07-2013, 12:20 PM   #1
aquaboot
Member
 
Registered: May 2005
Location: Berkeley, CA.
Distribution: debain freebsd
Posts: 483

Rep: Reputation: 31
Automatically move directory- scheduled event


Hi All,

I'd like to move directory "A" into directory "B" at 1:00 pm every Friday afternoon and have the process automated. Is there a activity scheduler I can use or do I need to learn how to write a script for this?

Thanks Much,

ab
 
Old 12-07-2013, 12:28 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,921

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Quote:
Originally Posted by aquaboot View Post
Hi All,
I'd like to move directory "A" into directory "B" at 1:00 pm every Friday afternoon and have the process automated. Is there a activity scheduler I can use or do I need to learn how to write a script for this?
The activity scheduler you're talking about is cron, and it's been used on *Nix systems for a long time now just for such things. And since you want to perform a customized action, you would obviously need a script. Check out the man pages for cron/crontab and one of the MANY easily-found scripting tutorials to get you started. You might also want to check out one of the many Linux backup utilities, which would at least COPY the files, if not move them.
 
Old 12-07-2013, 12:33 PM   #3
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
You can schedule a cron job for the same like this:
Code:
0 13 * * 5 "mv /path/to/A /patht/to/B"
To learn how to schedule cron jobs, check out these docs:
http://www.tldp.org/LDP/intro-linux/...ect_04_04.html
http://www.tldp.org/LDP/lame/LAME/li...sing-cron.html
http://linux.die.net/man/1/crontab
http://linux.die.net/man/5/crontab
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] move files or a directory to another directory using shell script user1111 Linux - Newbie 6 11-15-2013 09:13 AM
LXer: Linux event shows move to mainstream LXer Syndicated Linux News 0 08-07-2006 03:21 PM
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 11:55 PM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 04:04 AM
How to move files automatically to NFS? vwhk Linux - General 2 09-19-2002 06:28 AM


All times are GMT -5. The time now is 10:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration