Search

shirishweb

Your right place for "Right to Know"

Category

Linux tricks and tips

Installing Webmin tool on CentOS 7

Webmin is a free system administrator’s tool which gives the admin the direct configuration of the linux system through web. Thus eliminating the hard-to-remember linux commands. Actually this tool can be used for quick modifications on the linux system like setup user accounts, Apache, DNS, file sharing and much more. If you don’t know the exact commands to configure any aspects of the linux command line system, webmin is your tool.

Installation procedures:

  1. Download the webmin rpm through wget
  2. wget http://prdownloads.sourceforge.net/webadmin/webmin-1.820-1.noarch.rpm
  3. installed required dependencies
  4. yum –y install perl perl-Net-SSLeay openssl perl-IO-Tty
  5. install web from the rpm package
  6. rpm –U webmin-*.rpm

That’ it. It now installed in your system. Now browser https://localhost:10000

If in case of SSL related problem and want to disable it, we can change it in configuration

vim /etc/webmin/miniserv.conf

and change the line containing

ssl=1

to

ssl=0

and open the link  http://localhost:10000 again and login with your root account

Advertisements

Using find command in Unix and Linux systems

“Find” command searches all the files and directories inside directory that matches the given criteria like name, size, ownership, permission etc.

syntax:
find <path> [option/criteria] <argument>
option can be:
-atime <+N/-N/N> :- Access time based search
-mtime <+N/-N/N> :- Modification time based search
-name <Name> :- Name based search
-size <+N/-N/N> :- Size based search
-user <owner> :- owner based seach
-group <group> :- Group based search
-perm <permission> :- Permission based search
-type <type> :- File type based search
type can be ‘f’ or ‘d’ denoting searches for files only or directory only respectively

Examples;
1> Find all the files inside /home/test directory that have been modified within 7 days

1
2> Find all the files with ‘.conf’ filename extension inside the /etc directory

2
3> Find all the empty files (0 length files) inside the current directory

3
4> Find all the files and directories inside the whole system that have the permission ‘770‘ and t hat belongs to the user ‘test’

4
5> Find all the directories inside the /var/log directory

5
6> Find all the files in /etc that have length
a) Exactly 100KB

6
b) Within 100KB

7
c) Greater than 100KB

8
d) That have 100 characters in it.

9

Furthermore, three logical characters can be used to create more filtered search expression for the find query command.
-and
-o
!
7> Find all the empty files inside the current directory and remove them all

10
8> Find all the configuration files with .conf filename extension inside the /etc directory and copy them into the /home/test/backup directory

11
9> Find all the readonly files
12
10>Find all the directories with 770 permission and chmod to 755
14
11> Find all empty directories
15
12> Find all the empty file in current directly only and delete each one showing a prompt
16
13> Find all the files or folder in current directory and copy all the files to /backup directory preserving the permissions, times and ownership of every file and subdirectory
17

Create a free website or blog at WordPress.com.

Up ↑