Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Alternate node title: "You can't really call this version control"

  • Can't afford Perforce?
  • Too busy to set up a CVS pserver?
  • Too lazy to create an RCS directory?
  • No need for branches or tags?
  • No desire to share your files?
  • Don't really care about commenting on your revision?

If you answered "yes" to the above, then have I got the version control system for you!

It's easy to install and easy to use because it has NO features!

Clearly, this is not meant to be a replacement for your favorite fancy software. I use it when I'm in rapid hack experiment mode and I don't want to clutter up my real version control system with versions that should be thrown away.

It only uses Core modules and works on Unix and Windows. The POD says it all:

=head1 NAME B<bak> - Make a backup copy of a file =head1 SYNOPSIS bak file ... =head1 DESCRIPTION A uniquely-named backup copy of a file is created. The file is written to a subdirectory named C<backup>, which will be created if it does not yet exist. The name of the backup copy is the original filename with a date and timestamp appended to it. Multiple files may also be specified. Output: A file to subdirectory named C<backup>. Example1: bak file.txt Example2: bak *.doc =cut use warnings FATAL => 'all'; use strict; use File::Copy; use POSIX qw(strftime); die "Error: No files specified\n" unless @ARGV; mkdir 'backup'; my $date = strftime('%y%m%d_%H%M%S', localtime); for my $file (@ARGV) { copy($file, "backup/${file}_$date") or die "Copy failed: $!"; }

Update: Apr 28, 2011: If you want to preserve file permissions and you have File::Copy version 2.15 or later, change copy to cp.


In reply to Version control system for the laziest of the lazy by toolic

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (10)
    As of 2014-09-18 20:15 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (124 votes), past polls