Results 1 to 1 of 1

Thread: baSH website automation script help - Compress and archive

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Snohomish, Washington

    Question baSH website automation script help - Compress and archive

    I am writing a website and I want to automate the process of compressing and archiving the current Release folder, moving it into the Legacy folder, then moving the contents of the Dev folder into Release. I don't understand tar and gzip very well so I would like some help with the compressing and archiving part.

    Here is what I have so far:
    NOW=$(date +"%m-%d-%y")
    # Change to the Reviews directory
    cd /opt/lampp/htdocs/Reviews/
    # First compress the contents of the current Release folder called
    # Compress and archive release folder here
    # Move the compressed archive to ./Legacy
    mv -r "./Release.$NOW.tar.gz" ./Legacy
    # Clear the folder for the new files
    cd Release
    rm -r *
    cd ../
    mv -r ./Dev/* ./Release
    echo "Completed successfully.\n"
    Last edited by sikuneh; January 30th, 2012 at 05:13 PM.

Tags for this Thread


Posting Permissions

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