try this
perl -p -i -e 's/this/that/g' filename
Search and replace the string 'this' with the string 'that' in the file filename. You can also say * or *.html or any valid wildcard expression instead of filename. The s/// command uses regular expressions. If you want to alter the 'this' and...
this is the script im running a very simple script as you can see.
#!/bin/sh
# Tar backups written by Brent
#
cd /
echo "Tarring up usr/local/apache"
/usr/sbin/tar -zpcvf /var/coreosbkup/apache.`date +%Y.%m.%d.at.%H.%M.%S`.tgz /usr/local/apache
echo "Tarring up...
try
tar -zpcvf whereya-wantfile-saved.tgz path-to-dir-being-tarred
example i did something like this on my unix box
tar -zpcvf /var/bkup/apache.tgz /usr/local/apache
loqtis
Im running a shell script from crontab on a solaris machine that runs a tar backup of certain files on the machine. the script runs great when ran manually ...but when ever i try to run it from cron it creates a emtpy tar file and or doesnt run at all ...anyone have any thougths ???
thank you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.