Guy Rutenberg

Keeping track of what I do

Archive for the ‘Bash’ tag

Temporary Disabling Bash History

with 5 comments

Say that you’ve got to pass some password as command line argument to something. It would probably be a bad idea to store it in your ~/.bash_history, but clearing the file isn't desired either. So you need to temporary disable the command history for the current session. You can do it by unsetting the HISTFILE environment variable.

unset HISTFILE

The result is that while the session is active you can access the history as usual, but it won't be saved to the disk. History for other sessions, will behave as usual.

Written by Guy

May 10th, 2011 at 12:21 pm

Posted in Bash,Tips

Tagged with

Improved FTP Backup for WordPress

with 56 comments

This script backups both the database and files of a WordPress blog into a remote FTP server (while keeping a local copy). It’s an update of my WordPress Backup to FTP script. The main changes are auto-detecting database settings and better support for caching plugins (specifically WP-Cache). The new version makes it easier to backup multiple WordPress blogs to the same FTP server.
Read the rest of this entry »

Written by Guy

February 28th, 2010 at 8:38 am

Posted in Bash,Projects,Wordpress

Tagged with , ,