Here's my script, it scp's a tar file from a server, then expands and dumps all into one huge file for analysis by awstats. I then try to use rm -f to remove the dirs created and the files created but it doesn't work.
#!/bin/bash
cd /home/statlogs
/usr/local/bin/scp statlogs@director:/home/statlogs/director_access_logs.tar rssonate_web_logs.tar
tar --ungzip -xvpf rssonate_web_logs.tar
cd data1/weblogs/ssw1
cat access_log.* > ../../../alllogs.log
cd ../ssw2
cat access_log.* >> ../../../alllogs.log
cd ../ssw3
cat access_log.* >> ../../../alllogs.log
cd ../ssw4
cat access_log.* >> ../../../alllogs.log
perl /usr/local/apache2/htdocs/awstats/ -config=rssonate -update
rm -f alllogs.log
rm -rf data1
Can anyone give me any hint as to why the delete isn't taking place?
#!/bin/bash
cd /home/statlogs
/usr/local/bin/scp statlogs@director:/home/statlogs/director_access_logs.tar rssonate_web_logs.tar
tar --ungzip -xvpf rssonate_web_logs.tar
cd data1/weblogs/ssw1
cat access_log.* > ../../../alllogs.log
cd ../ssw2
cat access_log.* >> ../../../alllogs.log
cd ../ssw3
cat access_log.* >> ../../../alllogs.log
cd ../ssw4
cat access_log.* >> ../../../alllogs.log
perl /usr/local/apache2/htdocs/awstats/ -config=rssonate -update
rm -f alllogs.log
rm -rf data1
Can anyone give me any hint as to why the delete isn't taking place?