Author: Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

PHP fgets() function is used for reading a single line from a file. This function takes two arguments as described below. 1. File specifies the filename to read content 2. Length Optional parameter specifies the number of bytes to read from the file. Syntax PHP fgets() function uses the following syntax. fgets(file, length) Example – Read a single line Below are two examples of a reading single line from a file. Use this example to read the complete first-line content from a file.

Instead of a line, you can also define the number of bytes to read from a…

Read More

PHP fwrite() function used to write data to file. This function take three arguments 1. File specifies filename to write 2. String specifies the string to write to file 3. Lenght specifies maximum number of bytes to write to file (optional) Syntax PHP fwrite() function uses following syntax fwrite(file, string, length) Example Below is the sample example of writing data to file using php script. In below example first line will open myfile.txt in edit mode in current directory. Second line will write string to file, you can also specify the lenght here and result the number of bytes written.…

Read More

Node.js fs.writeFile() method writes data to a file asynchronously with replacing the file in case of already exists. This function can write data from a string or a buffer. The encoding option is ignored if data is a buffer. It defaults encoding is ‘utf8’, Default file mode is 0666 and default flag is used ‘w’ means write mode. Syntax The fs.writeFile() function in Nodejs (JavaScript) uses the following syntax. fs.writeFile(filename, data[, options], callback) Here: filename is the filename with path. data is the String or buffer to write options can be an object which is like {encoding, mode, flag}. callback…

Read More

Python is a powerful programming language. It is very friendly and easy to learn. At the writing time of this article Python 3.5.9 is the latest stable version available to install. This tutorial will help you to install Python 3.5.9 on your CentOS, Red Hat & Fedora operating systems. Step 1 – Prerequisites Use the following command to install prerequisites for Python before installing it. yum install gcc sqlite-devel Step 2 – Download Python 3.5 Download Python using following command from python official site. You can also download latest version in place of specified below. cd /usr/src wget https://www.python.org/ftp/python/3.5.9/Python-3.5.9.tgz Now…

Read More

Go is an open-source programming language developed by a team at Google. It provides easy to build simple, reliable, and efficient software. This language is designed for writing servers, that’s why it is using widely these days. Go has released the latest version 1.20. This tutorial will help you to install Go 1.20 on your Ubuntu 19.10, 18.04 LTS, 16.04 LTS, and 14.04 LTS systems. Step 1 – Install Go on Ubuntu Login to your Ubuntu system using ssh and upgrade to apply latest security updates there. sudo apt-get update sudo apt-get -y upgrade Now download the Go language binary…

Read More

This article will help you to install Python 3.5.9 on Ubuntu, Debian, and Linuxmint operating system. To know more about this version visit Python official website. Step 1 – Prerequisites You must have fulfilled all the prerequisites for installing Python on Ubuntu, Debian and Linuxmint. Use the following command to install all the prerequisites. After that go for the Python installation on Ubuntu. sudo apt-get install build-essential checkinstall sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev Step 2 – Download Python 3.5 Download Python source code archive from its official download website. You can also download Python…

Read More

Apache Solr is a powerful, open-source search platform built on Apache Lucene. It’s widely used for enterprise search and analytics use cases and has a robust set of features like full-text search, real-time indexing, and more. In this guide, we will walk you through the steps to install Apache Solr 9 on Ubuntu 18.04 and 16.04 LTS systems. Prerequisites Before starting, ensure that you have: A system running Ubuntu 18.04 Sudo privileges or access to the root user Basic knowledge of Linux terminal commands Step 1: Update the System First, update your system to ensure all existing packages are up…

Read More

Hadoop Distributed File System (HDFS) is a key component of the Hadoop ecosystem, designed to store vast amounts of data across multiple nodes, providing high availability and fault tolerance. Understanding and mastering Hadoop involves getting hands-on with HDFS commands to manage and manipulate the filesystem. In this article, we’ll take a deep dive into some of the most essential HDFS commands, exploring what they do, and how to use them effectively. Understanding Hadoop Distributed File System (HDFS) HDFS is a distributed file system that is designed to handle large datasets by distributing them across numerous nodes in a cluster. It…

Read More

The Hadoop Distributed File System (HDFS) is a core component of the Apache Hadoop project. It provides a distributed storage solution that is designed to handle large data sets across clusters of commodity servers. However, like any sophisticated software, it comes with its own set of challenges, one of which is the error message ‘Hadoop/HDFS ls: ‘.’ : No such File or Directory’. In this article, we will dissect this error, explore its potential causes, and provide actionable solutions. Understanding the Error Before delving into the causes and solutions, let’s understand the error in question. The ls command is a…

Read More

Let’s Encrypt is a certificate authority (CA) providing free SSL/TLS certificates. You can get a valid SSL certificate for your domain at no cost. These certificates can be used for production use as well. The certificates can only be requested from there server where the domain is pointed. Let’s Encrypt do a DNS check for the domain, that domain is pointed to the current server. After that it issue certificate for you. This tutorial will help you to install Let’s encrypt client on your Ubuntu system and issue SSL certificate for the domain. Secure Apache with Let’s Encrypt SSL Secure…

Read More