LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Shell script to copy all folders older than 7 days from Linux to Windows by samba (https://www.linuxquestions.org/questions/linux-general-1/shell-script-to-copy-all-folders-older-than-7-days-from-linux-to-windows-by-samba-869083/)

blackthu80 03-16-2011 11:06 PM

Shell script to copy all folders older than 7 days from Linux to Windows by samba
 
Hi all,

I want to make the script to copy all folders which older than 7 days from Linux server to Windows server by Samba.

And make it automatically by using cron

Pls help me.

quanta 03-16-2011 11:31 PM

Hi,

Split your question into 3 parts:
- mount your remote shared folder from Windows with mount -t cifs ...
- find all folders older than 7 days with find, --types, and -mtime
- copy it

blackthu80 03-17-2011 12:10 AM

Thank you, quanta
You make me clear about the step to do

However, I'm newbie of Linux so could you please help me to make the script?

quanta 03-17-2011 12:21 AM

Try to make your script for yourself first, we will help you.

blackthu80 03-17-2011 12:29 AM

Hi,

I understand and tried to make by myselft already.

If it has any problem I couldn't solve, Pls help me.


All times are GMT -5. The time now is 06:00 AM.