USB formatting is the process of erasing all data from the disk and prepare it for use. Sometimes we are required to change the filesystem on our USB drive, In that case, we have to format the USB drive with the new filesystem type. Formatting a USB drive in Ubuntu using Terminal commands is much easier than formatting it in Windows systems. This tutorial will help Ubuntu (Linux) users with the simple steps for format a USB flash drive using the command line. Step 1 – Attach USB to System Insert a USB drive into your system and identify your…
Author: Rahul
PHP is a popular server-side scripting language that is used to create dynamic web pages and web applications. It is open-source and is widely used for developing web applications, content management systems, and e-commerce websites. In this article, we will discuss how to install PHP 8.2, 7.4, and 5.6 on Ubuntu 18.04. Ubuntu 18.04 comes with PHP 7.2 installed by default. However, if you need to use an older or a newer version of PHP, you can follow the instructions below. Read: How to Install PHP 7.0 & PHP 5.6 on Debian 8/7 via PPA Note: Before installing a new…
When you are creating an application and want to display the user’s image on their profile picture. This can be a better option for you to take users image from there Gravatar account, from where we can simply get the image using their email address.
1 2 3 4 5 6 7 8 9 10 11 | <?php $default = ""; $size = 200; $gravatar_url = "http://www.gravatar.com/avatar/" . md5(strtolower(trim($email))) . "?d=" . urlencode($default) . "&s=" . $size; header("content-type: image/jpeg"); echo file_get_contents($gravatar_url); ?> |
Copy the above PHP script and use in your php code to show users gravatar in their profiles.
This is good to test a file has enough permission to do read, write or execute operations. For a good programmer, you should use these functions before doing any operations on the file. 1. Test read permission: Below script will check if the given file has read permission for currently logged in user. This will be useful to test before start reading any file inside a shell script.
1 2 3 4 5 6 7 8 | #!/bin/bash if [ -r /tmp/myfile.txt ] then echo "File has read permission" else echo "You don't have read permission" fi |
2. Test write permission: Below script will check if a given file has to write permission for currently logged in user. This will be useful to test before writing content to…
WHM & cPanel is the web-based system management control panel widely used for the Linux hosting environment. To use WHM/cPanel on the AWS environment, we will face the problem with normal instances. So we prefer to use VPC ( Virtual Private Cloud) in aws for installing WHM & cPanel server. This article will help you step by step in brief details for the configuration of the WHM & cPanel hosting environment on AWS instances. Follow below step by step details for configuring WHM & cPanel on AWS:- 1. Setup VPC (Virtual Private Cloud) First login to your AWS web console…
FTP (File Transfer Protocol) is widely recognized as a premier method for efficiently transferring files between different systems. Utilized extensively across various platforms, FTP allows for the rapid upload and download of files. It is supported by multiple applications, such as vsFTPd and proFTPd on Linux, and FileZilla Server on Windows. You can connect to an FTP server using several methods, with plenty of free tools available online for this purpose. However, system administrators often prefer the command line for its efficiency and control. This guide will walk you through the process of connecting to an FTP server using command…
Ubuntu 15.04 (Vivid Vervet) final Release date is scheduled to April 23, 2015. Ubuntu 15.04 Vivid Vervet has a short life, it will only support for 9 months for Ubuntu Desktop, Server and other Ubuntu flavors. If you are running with Ubuntu LTS releases (12.04 LTS or 14.04 LTS) for servers, we don’t recommend to upgrade it but for Desktop users upgrade to this release and enjoy new features. Ubuntu 15.04 (Vivid Vervet) Release Date: Ubuntu 15.04 (Vivid Vervet) – April 23, 2015 Ubuntu Reaching his End of Life: Some of older Ubuntu releases are reached to his End of…
In Linux, an empty file is a file that has a size of zero bytes. This means that the file does not contain any data, and it does not have any content when it is opened in a text editor. An empty file can be created using the touch command: `touch myfile.txt` This will create an empty file called myfile.txt in the current directory. You can also create an empty file using the echo command with the > operator: `echo > myfile.txt` This will overwrite any existing content in the file with an empty string, effectively creating an empty file.…
The command add-apt-repository is used for adding PPA reference to our Ubuntu or Debian systems. For newer installations, this command may not available in your system. Use the following commands to add this command utility in your system as per your operating systems. On Ubuntu & Debian Latest Version The latest version of Ubuntu 19.10, 18.04, 16.04 and Debian 10/9/8, add-apt-repository command utility is available under the software-properties-common package. So use the following command to install it. sudo apt-get install software-properties-common Reading package lists… Done Building dependency tree Reading state information… Done The following packages were automatically installed and are…
FileZilla is the most popular cross platform, opensource ftp client. FileZilla works as FTP, FTPS and SFTP client with many of features and an intuitive graphical user interface. Below is few key features of FileZilla Visit below url to install and configure vsftpd ftp server on Linux system with enabling SSL/TLS security. https://tecadmin.net/install-vsftpd-with-ssl-tls-on-linux/ Features of FileZilla Supports FTP, FTP over SSL/TLS (FTPS) and SSH File Transfer Protocol (SFTP) Cross-platform. Runs on Windows, Linux, *BSD, Mac OS X and more Available in multiple languages Supports resume and transfer of large files >4GB Tabbed user interface Powerful Site Manager and transfer queue…