Grep - PowerCram Blog - Page 2

Windows Command Line Tricks

Here are a few Windows command line tricks that might make your life easier. Save A List of Files to a Text File by Extension dir *.ext /s /b > files.txt This command line will create a file called files.txt. When you open this file, there will be a complete list of all the files in that directory […]

MySQL Backup Shell Script

***TO CREATE BACKUP SCRIPT ON LOCAL SERVERmkdir /root/binvi /root/bin/ (then copy script into this file)change parameters in script to match databasechmod 755 /root/bin/ ***TO VERIFY SCRIPT WORKS1. run this command/root/bin/mysqlbak.sh2. when script is done, check subdirs of /var/backup/db/daily for tarred & gzipped backups ***TO SCHEDULE THIS TO RUN DAILY, CREATE SYMBOLIC LINKln -s /root/bin/ /etc/cron.daily/ ***TO RESTOREmysql -uUSER […]