First command will render all hashes for all files
Second will sort the list so as you scroll you will easily spot duplicates with their paths.
m5deep is in most apt-get and yum repos.
#!/bin/bash
echo "stopping tomcat"
sh /etc/init.d/tomcat6 stop
cd /var/lib/tomcat6/webapps
echo "removing jenkins"
rm -rf jenkins
rm -rf jenkins.war
echo "downloading latest jenkins"
wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
echo "starting tomcat"
sh /etc/init.d/tomcat6 start
cd ~
echo "done"
Credit: http://www.christianoestreich.com/2011/03/jenkins-upgrade-script/
In ubuntu old jenkins.war is in /usr/share/jenkins/ folder
In ubuntu use “service tomcat6 stop” to stop the service