Server Admin Search
Articles Category
Linux TAR Command
- Details
- Category: Commands
- Published on Saturday, 07 May 2011 03:37
- Written by Server Administrator
- Hits: 436
Using Tar to zip and unzip files.
I use tar all the time to help zip and archive data on the servers I run. Here are a few tricks I use. If there are any questions, see the forum at forum.the-server-admin.com.
To archive all txt files I use the following command:
tar cvzf archive.tgz *.txt
To extract the contents of a tar file use:
tar xvzf archive.tgz
If you have a tar.zip use:
tar xfv *.zip.tar
Rsync Recursively
- Details
- Category: Commands
- Published on Friday, 02 December 2011 12:49
- Written by Server Administrator
- Hits: 488
Rsync Recursively
To copy a directory with Rsync Recursively use
rsync -avP /form /to
This will build a list and show you what it is doing and keep permissions. This is also good for a backup to a mirror location.
Linux Cron
- Details
- Category: Commands
- Published on Wednesday, 07 December 2011 03:37
- Written by Server Administrator
- Hits: 163
Linux Cron
Cron jobs are task setup on a Linux or UNIX system to run at a set time. I seen a few questions around about cronjobs. Here is a reference on cron.
How do I visit a site every day at 5 AM?Run the command “crontab -e” to edit the cron file. Then type:
0 5 * * * curl http://www.the-server-admin.com
Curl is a basic Linux command. Cron will run any command in this order.
How do I get cron Emails? Edit he crontab file: crontab -e Then make cron look like:
MAILTO: This e-mail address is being protected from spambots. You need JavaScript enabled to view it.
0 5 * * * curl http://www.the-server-admin.com
You can also get disk space output via cron. Edit the crontab... you should know who to do this by now. :) Make cron look like this:
MAILTO: This e-mail address is being protected from spambots. You need JavaScript enabled to view it.
0 5 * * * curl http://www.the-server-admin.com
0 12 * * * df -h
So any command you want to run everyday add the command to crontab.
If there are any questions, see our forum at http://forum.the-server-admin.com

