find command numeric arguments
Numeric arguments can be specified as:
+n for greater than n.
-n for less than n.
n for exactly n.
-amin n
File was last accessed n minutes ago.
-anewer file
File was last accessed more recently than file was modified. If file is a symbolic link and the -H option or the -L option is in effect, the access time of the file it points to is always used.
-atime n
File was last accessed n*24 hours ago. When find figures out how many 24-hour periods ago the file was last accessed, any fractional part is ignored, so to match -atime +1, a file has to have been accessed at least two days ago.
-cmin n
File’s status was last changed n minutes ago.
-cnewer file
File’s status was last changed more recently than file was modified.
-ctime n
File’s status was last changed n*24 hours ago. See the comments for -atime to understand how rounding affects the interpretation of file status change times.
Install the Parallels Plesk Panel Firewall module through the command line
Note: Parallels Plesk Panel Firewall module and other modules that come with Parallels Plesk Panel are located in the directory /opt/modules of Parallels Plesk Panel distribution.
You can install the Parallels Plesk Panel Firewall module to the Parallels Plesk Panel server in two ways: from the Parallels Plesk Panel interface (recommended), and from the command line.
Login as root to the server, where Parallels Plesk Panel is installed.
Run the command /plesk_installation_directory/admin/bin/modulemng –install –file=[plesk_firewall_module_filename], where ‘plesk_installation_directory’ is the directory you installed Parallels Plesk Panel to.
Example:
/usr/local/psa/admin/bin/modulemng –install –file=/opt/modules/firewall.rpm
Plesk Command Line Utilities
Command line utilities for Plesk for Linux/Unix are located in the /usr/local/psa/bin directory on the Plesk server.
To run command line utilities:
Log in to the Plesk server via SSH.
Use one of the following options to run a utility:
To run a utility from any directory, use the following command line format:
# /usr/local/psa/bin/[utility name] [parameters] [options]
To run a utility when the /usr/local/psa/bin/ is your current directory, use the following format:
# ./[utility name] [parameters] [options]
Upon successful execution, utilities return the 0 code. If an error occurs, utilities return code 1 and display the description of the encountered problem on stderr.
Source: http://parallels.com/Plesk/
The visudo command.
The sudo command also provides a comprehensive audit trail. Each successful authentication is
logged to the file /var/log/messages and the command issued along with the issuer’s user name
is logged to the file /var/log/secure.
Another advantage of the sudo command is that an administrator can allow different users access to specific commands based on their needs.
Administrators wanting to edit the sudo configuration file, /etc/sudoers, should use the visudo
command.
To give someone full administrative privileges, type visudo and add a line similar to the following in the user privilege specification section:
and then
This example states that the user, admin, can use sudo from any host and execute any command.
The example below illustrates the granularity possible when configuring sudo:
%users localhost=/sbin/shutdown -h now
This example states that any user can issue the command /sbin/shutdown -h now as long as it is issued from the console.
The sudoers file should always be edited by the visudo command which locks the file and does grammatical checking. It is imperative that sudoers be free of syntax errors since sudo will not run with a syntactically incorrect sudoers file.
The sudo Command
The sudo command offers another approach to giving users administrative access.
When trusted users precede an administrative command with sudo, they are prompted for their own password.
Then, once authenticated and assuming that the command is permitted, the administrative command is executed as if by the root user.
The basic format of the sudo command is as follows:
In the above example, command would be replaced by a command normally reserved for the root user, such as mount.
The sudo command allows for a high degree of flexibility. For instance, only users listed in the /etc/sudoers configuration file are allowed to use the
sudo command and the command is executed in the user’s shell, not a root shell.
Example from /etc/sudoers
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
%eeeuser ALL=NOPASSWD: /etc/acpi/eeepc/eeepc-actions.sh, /etc/acpi/eeepc/eeepc-lvds-toggle.sh