Webmin is a web hosting control panel like CPanel which provides easy to use interface for managing Unix-like systems. Webmin is very easy to use and a lightweight application can be easily installed on the system within a minute. Webmin removed all the manual tasks to be done through command lines. This article will help you to install the latest Webmin on Ubuntu 19.10, 18.04 & 16.04 LTS systems. This article is using APT to install Webmin, you may also download Webmin packages directly and install in system. Step 1 – Configure APT Repository To install or update Webmin in…
Author: Rahul
Some times you may require to convert any string to uppercase (all letters). This tutorial will help to convert a string (any case) to the upper case as showing in the below image. Convert String to Upper Case Using Python programming language you can use string .upper() function to convert any string to upper case. Here is the sample Python code to convert string to uppercase.
1 2 3 4 | >>> s = "Hello Python" >>> print(s.upper()) HELLO PYTHON |
Suggested reading Some more examples of string conversions in Python. Convert String to Lowercase in Python
Question – How do I sort du -h command output by there sizes? In the GNU Coreutils >= 7.5 package, sort command provides -h parameter allows to compare human-readable numbers (e.g., 10K 15M 1G etc). This helps up to compare the results of `du -h` and short them. du -h * | sort -h The above will show the results in the ascending order by size. You can reverse this using -r to show results in descending order. du -h * | sort -rh 15M btmp.1 7.2M apache2 2.2M auth.log.1 1.9M btmp 1.5M auth.log 1.3M redis 656K letsencrypt 468K auth.log.4.gz…
Laravel, a popular PHP framework for web application development, has a strong focus on security. Among the many security considerations in Laravel, properly setting up file permissions is crucial. Without the right permissions, your application may be vulnerable to attacks, or it could malfunction due to lack of necessary access. In this tutorial, we’ll walk you through the steps for correctly setting up file permissions in Laravel. Understanding File Permissions Before diving into the steps, it’s essential to understand what file permissions are. Every file and directory in your Laravel application has associated permissions that dictate who can read, write,…
Use rm -r switch with the git command to remove directory recursively. After removing the directory you need to commit changes to the local git repository. Then push the changes to remove the directory from the remote git repository. Use the command line below to remove the directory named test_dir from the current directory. git rm -r test_dir Then commit and push to apply changes in the local and remote repository. git commit -m “Removed test directory” git push origin master # Change ‘master’ with your branch name All done, The test_dir has been removed from the local as well…
Setting the proper file permission for any web application is an important part of web hosting. In this tutorial, you will learn how to change file permissions on folder and sub-folders recursively in a single command. As you know, In Linux everything is treated as a file. A folder is also known as directory file denoted by ‘d’ in the permission section. The below command will set the owner to www-data and group-owner to ubuntu for all files and directories and subdirectories. sudo chown -R www-data:ubuntu /var/www/html Use the chmod command to change the permissions for all files, directories, and…
This tutorial will help you to install Dovecot on Ubuntu systems. Dovecot package provides service for POP/IMAP protocols. With these protocols, you can access emails accounts from remote clients. Step 1 – Install Dovecot on Ubuntu Dovecot packages are available under default Ubuntu repositories. You can install Dovecot on Ubuntu by running a single command. Open a terminal and execute below command: sudo apt install dovecot Step 2 – Configure Dovecot Dovecot is a service used for providing POP/POP3s and IMAP/IMAPs protocols. POP/IMAP protocols are used for fetching emails from email accounts. Edit dovecot configuration file and search for below…
An array is a container of multiple values of similar types. After initializing an array, how can you empty it? This tutorial will help you to empty an Array in JavaScript language. Empty Array in JavaScript Use the following syntax to empty an Array. Here myArray is the name of Array. myArray = []; The above code will create an Array named myArray with no content. If the myArray already exists, will lose all the existing elements. You can also set the length to 0 to make it empty. myArray.length = 0
Python is a powerful and versatile programming language that is widely used in various applications, from web development to data analysis. In this article, we’ll explore how to write a Python program that lists all files in a specified directory. This operation can be quite useful in several contexts, such as when you need to organize files, analyze directory content, or perform batch operations on multiple files. Prerequisites Before we start, ensure that you have Python installed on your system. You can download the latest version of Python from the official website (https://www.python.org/). As of the last update of this…
Question – How do I check If a String contains another substring in Java? In our previous article, you learned to compare two strings in Java programming language. This tutorial will help you to check if the main string contains another substring in it. Syntax
1 2 | str1.contains(str2) // Case sensitive str1.toLowerCase().contains(str2.toLowerCase()) // Ignore case |
Example 1 – Check with Case Sensitive This will be case sensitive check. As per the below example, Welcome is different than welcome as we know java is a case sensitive programming language.
1 2 3 4 | String str1 = "Hi, Welcome to TecAdmin"; str1.contains("Welcome") //Return True str1.contains("welcome") //Return false (due to case sensitive) |
Example 2 – Check with Ignoring Case Using this string will be checked with ignoring the case. The function change…