May 19th, 2009
Exclude packages from yum update
Exclude packages from yum update
Example on how to exclude a number of packages:
1. Open /etc/yum.conf with your preferred text editor.
2. Enter the following line with your package names:
Exclude packages from yum update
Example on how to exclude a number of packages:
1. Open /etc/yum.conf with your preferred text editor.
2. Enter the following line with your package names:
Selecting a cPanel Build Type Pre-Installation
You can define your build type by defining the variable CPANEL. cPanel offers 4 build types to choose from: stable, release, current, and edge.
To choose the build type, add 1 of the 4 following lines to /etc/cpupdate.config.
The cPanel and WHM interfaces will be installed according to which of the 4 options you define in the configuration file.
tee command
Print the results to the screen but also to a file.
You can enter more than one filename if you want multiple copies.
Cron is a time-based job scheduler in Unix-like computer operating systems.
cron - daemon to execute scheduled commands (Vixie Cron)
Example: the following will clear the Apache error log at one minute past midnight each day.
There is also an operator which some extended versions of cron support, the slash (’/') operator (called “step”), which can be used to skip a given number of values. For example, “*/3″ in the hour time field is equivalent to “0,3,6,9,12,15,18,21″.
So “*” specifies ‘every hour’ but the “*/3″ means only those hours divisible by 3.
# .—————- minute (0 - 59)
# | .————- hour (0 - 23)
# | | .———- day of month (1 - 31)
# | | | .——- month (1 - 12) OR jan,feb,mar,apr …
# | | | | .—- day of week (0 - 6) (Sunday=0 or 7) OR sun,-to-,sat
# | | | | |
# * * * * * command to be executed
How do I keep my crontab from sending an email every time it runs?
Add the following > /dev/null 2>&1
The >> /dev/null 2>&1 part means to send any standard output to /dev/null (the linux trash can) and to redirect standard error (2) to the same place as the standard output (1). Basically it runs the command without any output to a terminal etc.
If you wanted to save the output of a certain command you can replace the “>> /dev/null 2>&1″ with “>> /home/user/script.log 2>&1″