Unix / Linux

Drupal CRON Setup and Scheduling - cron.php

From the command line, open the crontab using the default editor. You can change your default editor, just google the commands.

crontab -e

And then add the line:

30 23 * * * php /home/account/public_html/cron.php

This will run cron.php at 11:30 every day. For more configuration settings, see the drupal page or this good tutorial.

Configure LAMP Server for Drupal 7 and Migrate Development Site - No GUI, command line only

To start with, I created a tarball with bz2 compression of the dev site. Make sure to explicitly include .htaccess because the tar command, like the ls command does not include filenames with "." as the first character. Navigate to the root of your site and execute the following (-c create | -v verbose (lists files as it goes) | -j bz2 compression | -f file):

tar -cvjf nameofsite_date_of_copy.tar.bz2 * .htaccess

Also, you will need the mysqldump

.htaccess 301 Redirect to Different Domain

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.newdomain.com/$1 [r=301,nc] 

chown and chgrp in one command

chown user:group filename.ext

Of Course, to change all of the files in a folder:

chown user:group folder/*

And then, once you know that, you can do multiple files/folders at once:

chown user:group folder folder/* filename.ext filename2.ext

Syndicate content