Archive

Posts Tagged ‘shell-script’

Tip: Listing and Compressing modified files on SVN since latest update on Linux

November 26th, 2009 Shrihari No comments

In order to find or look at the list of all the modified files on SVN (since the last update) on any Linux host, you may use the following command (say we need to find java or xhtml files)


svn status -u | grep -e '.java' -e '.xhtml' | awk '{if($2 ~/^[0-9]+$/) {print $3} else {print $2}}'

This command would also print the unversioned (not added to SVN) files as well. Now if you want to compress these list of files (using tar), issue the following shell command:


svn status -u | grep -e '.java' -e '.xhtml' | awk '{if($2 ~/^[0-9]+$/) {print $3} else {print $2}}' | xargs tar cvfz modifiedfiles.tar.z
Categories: Uncategorized Tags: ,