[Melbourne-pm] need help for one kind of script
cas at taz.net.au
Fri Jun 29 17:18:32 PDT 2007
On Thu, Jun 28, 2007 at 05:58:02PM +0530, ankur dave wrote:
> I need one script which will give me the last updated file from the
> specified directory.
> My problem is let say I am working on /var/www/test/ and in this we have
> some 5 other folders and so many perl and PHP files.
> now I will update all the files but at the end of the day I want to know
> what are the files I have updated.
i was just reading this again and realised that your best option is to
set up a subversion (or other revision-control system) repository and
check in the entire directory tree after each session of editing.
this will give you not only a list of recently edited files, but also
allow you to get a diff of the exact changes made, and even a complete
history of all changes made to all files since you started using svn.
you can even do neat things like seeing the differences between ANY two
versions of a file or set of files (e.g. between the current version and
five versions ago, or between version 1.41 and version 1.58)
and if you realise you made a mistake, you can revert to any previous
version of a file or set of files.
it takes a little discipline to use (but is very easy once you get into
the habit) and is very much worth the small investment in time and
you can find subversion at http://subversion.tigris.org/, and it is
packaged for most (all, probably) linux distributions. given your
/var/www directory, i'd guess that you're using debian or one of the
debian derivatives like ubuntu.
craig sanders <cas at taz.net.au>
A clever prophet makes sure of the event first.
More information about the Melbourne-pm