pastebin - collaborative debugging tool
script.kpaste.net RSS


Untitled
Posted by Anonymous on Tue 3rd Mar 2015 00:59
raw | new post

  1. #!/bin/bash
  2.  
  3.  
  4. # Set backup location here
  5. bak=$1
  6. timestamp=$(date +%F_%T%z)
  7.  
  8. # Make a timestamped directory there.
  9. mkdir -v "$bak"homeprofile_backup_"$timestamp"
  10.  
  11. # Make what has been bade by mkdir and put that into a variable.
  12. timedir="$bak"homeprofile_backup_"$timestamp"
  13. backr="rsync -avp --partial --progress --human-readable --relative"
  14.  
  15. # For this, blaah.txt has to exist in your directory, that one is supposed to get copied over.
  16. "$backr" blaah.txt "$timedir"

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at