How to copy files from one directory to another
Assuming you are in the directory where you want to copy the files, use this Linux command:
cp -R * destination path
Assuming you are in the directory where you want to copy the files, use this Linux command:
cp -R * destination path
mv directoryname-current directoryname-new
The following command removes an empty directory only
$ rmdir directoryname
In order to remove a directory, all sub directories below it including all files
$rm -r directoryname
Care should be taken when using this command. Linux will permanently delete all files and directories with no option to recover anything if you make a mistake. Make sure you understand [...]
tar xvzf file.tar.gz
At the SSH Unix / Linux prompt type:
mysqldump -u username -p databasename | mysql -u username -p database
You will be prompted to enter each database password.
the first mysql database will be copied to the 2nd mysql database.
Make sure you have already set up the database name and username and password before you attempt this.
From the Linux shell prompt via SSH type:
/usr/bin/mysql –user=schoolco_scott –password=scott08 –database=schoolco_schoolco –table=temp_image < /home/schoolco/public_html/image.sql
Cron Job is a Unix/Linux command that automates tasks. It works well to automate PHP Scripts.
Cron comes from the word Chronology.
Crontab Format
minute hour day month weekday command
30 22 15 1 * /home/user/script.php
The command above runs script.php at 10:30pm on 15th January.
An asterisk in any field means all values so 0 18 * * * /script.php [...]