-   Linux - General (
-   -   Help creating a directory back up shell script (

WarriorWarren 04-06-2003 10:22 AM

Help creating a directory back up shell script

I am trying to create a shell script which backs up one directory to another. It should takes two parameters from the user, firstly the directroy to back and the directory to back up to. I then need the script to check if the directories are valid, if not output to user, and then to check if there will be any files over written in the process and to report these to the user with an option to overwrite or not.

Help would be greatly appreciated as this is an assignment that i have to do and im getting no-where fast.

Thanks all

acid_kewpie 04-06-2003 10:37 AM

Rule number 1 in how to get other people to do your homework for you: do NOT tell them it is your homework:

this is an assignment
:rolleyes: do not ask homework questions on this site, work it out for yourself using the resources you should have been provided.

fsbooks 04-06-2003 10:43 AM

Have you decided what shell you are going to write this script in? csh, tcsh, bsh, bash, ksh, ash, sh, or some other? In other words, have you written your first line of code? It is always a good first step.

If there is a choice in the matter, I might recommend bash, in part because of the Advanced Bash-Scripting Guide at the LDP. It should have all the information you need. I'ld give you a link, but I use a mirror near me and I don't know where you are located.

WarriorWarren 04-06-2003 10:45 AM

terribly sorry chris, I didnt realize that the forum doesnt enjoy helping others understand Linux.

I also am not asking someone to do my homework, im asking for a little help and guidance. All the tools required are not in the resources that are supplied, it is intened that some information is
researched and discussed with others.

Also being from UK myself, and being a part time adult student I must admit I am struggling with this assignment and this is a last resort to actually ask online.

Dont worry, no more questions about homework thoug. Thanks for your time.

WarriorWarren 04-06-2003 10:48 AM

Hi thanks, I have started writing the script in bash
im using commands find, cp and if statements. I am in the UK

david_ross 04-06-2003 10:54 AM

Give the guy a bit of a break - take a look at:
Search the document for
"a list of testís options"

This should be all you need to write a bash script.

WarriorWarren 04-06-2003 10:56 AM

you are a gentleman and a scholar

All times are GMT -5. The time now is 04:38 AM.