Command: while true;do echo “Press CTRL+C to Exit”; done Example 1: Some times we are required to execute some commands or processes continuously until stop it forcefully or conditionally. The following example of while loop will run continuously until stopped forcefully using ctrl + c. while true do echo “Press CTRL+C to Exit” done Example 2: We can also use colon “:” in place of “true” with while loop for creating infinite loop in bash script. while : do echo “Press CTRL+C to Exit” done Stopping Loop on Condition: In case we need to terminate an infinite while loop on…
Author: Rahul
Sometimes you may be required to count total lines in a file in Unix/Linux systems. This tutorial helps you with multiple methods to count the number of lines in a file in a Linux system via the command line. Count lines with wc Command The wc command is the “word counter” for the Unix/Linux systems. This is a widely used command among Linux users for counting the lines in a file. It is also useful for counting words and characters in a file. Open a terminal and type command to count lines: wc -l myfile.txt You can also count the…
All the groups except the primary group are called the secondary groups of Users, for whom they belong. Generally, the primary group is created at the time of user-created with the same name. You can also assign a user to other groups to inherit their group permissions. Syntax The gpasswd command uses the following syntax for removing a user from group. gpasswd –delete USER GROUP Change USER with your actual user name and GROUP with named of group from which you want to delete user. Example Use the following command to remove user jack from sudo group. gpasswd -d jack…
Secondary groups are the groups that users added after the creations. The primary groups are created during the user creation process. In order to the permissions, there is no difference between them. This quick tutorial helps you to add an existing user to a secondary group in Linux via the command line. Example Use the usermod command-line tool to assign a user to a secondary group. Here you can define multiple group names separate them by a comma. The following command will add jack to sudo group. usermod -a -G sudo jack To make sure, check the entry in /etc/group…
After installing a new Tomcat server, there will be no user created by default to access Administrator and Manager web interfaces. After completing the installation set up Tomcat Admin and Manager user accounts and set their passwords. You can also visit our following articles about installing Tomcat on Linux systems. How to Change Tomcat Administrator Password To create user account edit conf/tomcat-users.xml file in editor and copy below configuration inside the <tomcat-users>…</tomcat-users> tags.
1 2 3 4 5 6 7 | <tomcat-users> <!-- User admin can access manager and admin section both --> <role rolename="admin-gui" /> <user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" /> </tomcat-users> |
How to Change Tomcat Manager Password
1 2 3 4 5 6 7 8 9 10 11 | <tomcat-users> <!-- User manager can access only manager section --> <role rolename="manager-gui" /> <user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" /> <!-- User admin can access manager and admin section both --> <role rolename="admin-gui" /> <user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" /> </tomcat-users> |
As per the above configuration user manager only can access the manager web interface but the admin can access…
Brackets is a lightweight, modern, powerful text editor for web developers to edit source codes. It is also available for Linux systems. It has lots of features which you must love to use. This article will help you for installing Brackets Text editor on Ubuntu and Debian systems using apt-get or ppa. Features Provides in-line editing of source. Provides provides live preview for various browser. Brackets work with preprocessors in a whole new way. It provides improved typing performance with code hints. Install Brackets on Ubuntu Brackets Text Editor PPA is maintained by the webupd8 team for Ubuntu installations. Use…
A “tar.bz2” file is a type of compressed file created using the Unix/Linux tar command coupled with the bzip2 compression method. This format is especially useful for combining and shrinking large files or file collections into a more manageable and transferable single file. To make such an archive, one employs the tar command to gather multiple files or directories into one archive, and then applies the bzip2 algorithm to reduce the archive’s size. This produces a file with the extension .tar.bz2, which can be decompressed using the tar command and the -j option. This tutorial offers guidance on: Decompressing a…
Phalcon is a high performance Php framework with MVC support. Its is very useful framework for developing dynamic applications rapidly. This article will help you install and enable Phalcon php framework in CentOS, Redhat and Fedora Systems. Install Required Packages To start with Phalcon Project, we first need to setup a running LAMP server. If you have already running LAMP stack skip this step else use followings commands to setup lamp stack. Install Apache # yum –enablerepo=remi,epel install httpd Install MySQL # yum –enablerepo=remi,epel install mysql-server # service mysqld start # /usr/bin/mysql_secure_installation Install PHP # yum –enablerepo=remi,epel install php php-mysql…
Welcome! If you’re here, it’s likely because you’re excited about harnessing the power of Phalcon, the high-performance PHP framework, in a Linux environment. In this article, we’ll walk you through the process of setting up your first project using Phalcon Developer Tools on a Linux system. Prerequisites Before starting, ensure that you have the following installed on your system: PHP 5.7 or higher: Phalcon is a PHP-based framework, so you’ll need a compatible PHP version installed. You can check your PHP version by running `php -v` in your terminal. Phalcon PHP extension: This is the core Phalcon framework. You can…
Phalcon is a high performance Php framework with MVC support. It is a very useful framework for developing dynamic applications rapidly. This article will help you install and enable the Phalcon PHP framework in your Ubuntu system. Prerequsities Firstly you need to install some prerequisites packages in your system using the following commands. sudo apt-get install gcc libpcre3-dev software-properties-common Then install PHP 5.6 or later version with required modules. sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php php-curl php-gd php-json php-mbstring Install Apache2 sudo apt-get install apache2 libapache2-mod-php Install MySQL sudo apt-get install mysql-server php-mysql Install Phalcon PHP…