Archive for the tag 'list'

Getting List of Product Components from Parallels Plesk Panel

To get a list of the release components, issue the command of the following format:

parallels_installer –select-release-id [ID] –show-components

For Parallels Plesk Panel 10.0 on a Linux/Unix server:

parallels_installer –select-release-id PLESK_10_0_0 –show-components

A list of components is displayed with component names in the left part, and indication of whether this component can be installed ([install]) or upgraded ([upgrade]), with brief descriptions in the right part, for example (fragment):

* base [install] - Parallels Plesk Panel base packages
* autoinstaller [install] - Parallels Installer
* postfix [upgrade] - Postfix mail server

The actual components are marked by [up2date].

Reference : http://parallels.com/

How to list all the loaded modules in apache

We can use the following command to list all the loaded modules in apache (both DSO and Static)

This example is from a debian box using apache2.

host ~: apache2ctl -t -D DUMP_MODULES

Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
setenvif_module (shared)
status_module (shared)
Syntax OK

SBDavid

Add user to sudoers list

Add user to sudoers list

sudoers - list of which users may execute what.

Login as root and then run the command visudo, add a line. Replace username to the actual user name.

username ALL=(ALL) ALL

/etc/sudoers - This file MUST be edited with the ‘visudo’ command as root.

To add all user in wheel group to sudoers list, login as root and then run the command visudo to uncomment the line below, or add this line is it not exist.

%wheel ALL=(ALL) ALL

The complete parameter list for the ls command.

There are lots of parameters for the ls command that can come in handy as you do file management. If you use the man command for ls, you’ll see several pages of available parameters for you to use to modify the output of the ls command.

root@dell:~# ls -sail /etc |less
418076 8 -rw-r–r– 1 root root 4623 May 5 2009 Muttrc
493130 4 drwxr-xr-x 2 root root 4096 Jul 6 2009 Muttrc.d
416980 4 drwxr-xr-x 3 root root 4096 Sep 27 2008 NetworkManager
500697 4 drwxr-xr-x 2 root root 4096 Apr 7 2009 ODBCDataSources
416981 4 drwxr-xr-x 13 root root 4096 Dec 8 19:19 X11
416982 4 drwxr-xr-x 4 root root 4096 Sep 1 2007 Xprint
417381 4 -rw-r–r– 1 root root 2563 Jan 3 2008 a2ps-site.cfg
417382 16 -rw-r–r– 1 root root 15064 Jan 3 2008 a2ps.cfg
416983 4 drwxr-xr-x 9 root root 4096 Sep 27 2008 acpi

A common combination to use is the -a parameter to list all files, the -i parameter to list the inode for each file, the -l parameter to produce a long listing, and the -s parameter to list the block size of the files. The inode of a file or directory is a unique identification number the kernel assigns to each object in the filesystem. Combining all of these parameters creates the easy-to-remember -sail parameter.

SBDavid

lsof - list open files example

To list all open files, use:

lsof

To list all open Internet, x.25 (HP-UX), and UNIX domain files, use:

lsof -i -U

To list all open IPv4 network files in use by the process whose PID is 1234, use:

lsof -i 4 -a -p 1234

Presuming the UNIX dialect supports IPv6, to list only open IPv6 network files, use:

lsof -i 6

To list all files using any protocol on ports 513, 514, or 515 of host wonderland.cc.pur-due.edu, use:

lsof -i @wonderland.cc.purdue.edu:513-515

To list all open files for login name “abe”, or user ID 1234, or process 456, or pro-cess 123, or process 789, use:

lsof -p 456,123,789 -u 1234,abe

To list all open files on device /dev/hd4, use:

lsof /dev/hd4

To find the process that has /u/abe/foo open, use:

lsof /u/abe/foo

To send a SIGHUP to the processes that have /u/abe/bar open, use:

kill -HUP `lsof -t /u/abe/bar`

To find any open file, including an open UNIX domain socket file, with the name /dev/log,use:

lsof /dev/log

Next »