Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I'm a computer science professor and I'm fairly new to the linux world. I'm going to be teaching an Intro to Fedora 8 class in a few weeks, and ...
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    3

    Examples Needed

    Hi, I'm a computer science professor and I'm fairly new to the linux world. I'm going to be teaching an Intro to Fedora 8 class in a few weeks, and I just finished a potential scripting project for my students.

    So, if possible, would any of you mind reading over my specifications and showing me how you would script this? Try to just imagine you're one of my students, with a very amateur level of skill. And try as hard as possible to stick exactly to the specs please =)

    Project 2: backup script

    In your second project you need to develop a backup shell script that allows a user to backup selected directories.

    In the first part of the project, you should write the script itself. The backup script should do the following:

    * it takes two arguments: the name of the directory to which you need to save backup file and a name of the file with the list of directories that the script needs to backup.
    * the script should check
    o the number of arguments and print the usage message if not all arguments are provided
    o that the backup directory is in fact a directory
    o that argument file is a readable file
    * if all needed arguments are given, the script should
    o within the specified backup folder create a sub-folder named backup_today's date. For example, if the script is run on March 14, 2008, the sub-directory name should be backup_2008-03-14
    o read the contents of the argument file and compress each given directory into its own file. Please use the tar command for the compression. If the name of the directory to backup is for example /home/daniel the created file should have a name home-daniel.tar.gz. Hint: use the tr command to transform the slash symbols '/' into dashes '-'.
    o This file should be created in the new backup directory the script just created.



    I'd really appreciate any help/feedback you could give =D

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Welcome to linuxforums!

    How do we know you're not one of the students?

    If you're a computer science professor, you should be able to do this yourself, or get one of your graduate students to do it for you.

    Hope this helps.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    He definitely doesn't write as a computer science proffesor.

    And computer science proffesors are usually not new to linux (or unix for that matter, since we are talking about scripting and the host OS really doesn't matter so much, as long as it's posix and you use the standard tools).

    Even if he were really new to this stuff, he (as a professor), has colleagues to discuss this in private, because internet forums are the first place where students look when they want to cheat, and therefore, asking the people to make post here examples is more or less the same than giving the solutions directly to his own students.

    So, I'd just close this thread and forget about it.

    Anyway, it's good to see that ye olde social engineering is still alive.

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Hi Hasjarl !

    Welcome to the LinuxForums !

    I agree with wje_lf and i92guboj. I would suggest you to try to script yourself and feel free to start a new thread if you have any particular problem. We will be glad to help you.

    Locked.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...