Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Linux Articles
Page 114 of 134
How to Create a Shared Directory for All Users in Linux?
When multiple users need access to the same set of directories or files, we need to create shared folders in Linux. Linux uses users and groups with specific permission levels to enable secure data sharing. Below are the steps to create shared folders where multiple users can read and update files. Step 1: Create the Shared Directory First, create the directory that will be shared. The -p flag creates the directory and ignores errors if it already exists ? sudo mkdir -p /bigproject/sharedFolder Step 2: Create a User Group Create a user group ...
Read MoreHow to Count Word Occurrences in a Text File using Shell Script?
Linux shell scripting provides powerful tools to process text files and analyze their content. One common task is counting word occurrences in a file using pattern matching and counting commands. This article demonstrates several approaches to count specific words in text files. Sample Input File Let's create a sample file to demonstrate our examples ? cat inspire.txt Mastering anything needs practice. It also needs patience. And it needs time and other resources. Using grep and wc The grep command finds patterns in text, and when combined with wc, we can ...
Read MoreHow to Count Number of Files and Subdirectories inside a Given Linux Directory?
When working with Linux systems, it's essential to know how to count files and subdirectories within a given directory. Python provides several ways to accomplish this task, from using the os module to leveraging the pathlib library for more modern approaches. Using os.walk() for Recursive Counting The os.walk() function recursively traverses directories and provides separate counts for files and subdirectories ? import os def count_files_and_dirs(directory): file_count = 0 dir_count = 0 for root, dirs, files in os.walk(directory): ...
Read MoreHow to Copy File Permissions and Ownership to Another File in Linux?
When backing up data or configuring software in Linux, you often need to maintain the same ownership and permissions across files. Instead of manually setting permissions for each file, Linux provides efficient methods to copy these attributes from one file to another using the chown and chmod commands with the --reference option. Copying File Ownership Use the --reference switch with chown to copy ownership from a source file to a target file ? Syntax chown --reference=source_file target_file Example Let's copy ownership from ref_file.txt to all_rivers.txt ? # Check current ownership ...
Read MoreCreate Shortcuts to Long and Complicated Paths in Linux (Gogo)
Gogo is a tool to bookmark directories with long and complicated paths in the Unix shell. Because the long paths are difficult to remember and cumbersome to type in, gogo provides a simple way to create shortcuts. In this article we'll see how to install gogo and use it. Installing Git We first need to have git installed in our system which will be needed for gogo installation. To install git in an Ubuntu system follow the below command ? $ sudo apt install git Running the above code gives us the following result ...
Read MoreBest HTML & CSS Code Editors for Linux
HTML and CSS are the building blocks of web development. They are the primary languages used for creating beautiful and responsive websites. Whether you're a seasoned developer or a beginner, having the right tools can make your coding experience smoother and more efficient. In this article, we'll explore the best HTML and CSS code editors for Linux. What is a Code Editor? A code editor is a software application that allows developers to write, edit, and manage code. It provides a user-friendly interface with features like syntax highlighting, code completion, and debugging tools. Code editors are available for ...
Read MoreHow to Install phpMyAdmin with Nginx on Ubuntu?
When you try to build a website for production or just start learning web development, you need a server to make your web application accessible from the browser to other users, either to use it or test its functionality. Nginx is a better choice for a server to serve websites. It is known for its efficiency and capacity to handle large traffic. Nginx can also work as a reverse proxy and load balancer. The pronunciation of the word "Nginx" is like this: engine-x. phpMyAdmin is a web interface to manage MySQL and MariaDB databases. It allows us to ...
Read MoreSetting Up Nginx with MariaDB and PHP/PHP-FPM on Fedora 24 Server and Workstation
Hosting websites and online applications requires setting up a web server infrastructure. In this article, we'll understand how to set up Nginx on Fedora 24 Server and Workstation using MariaDB and PHP/PHP-FPM. This combination creates a powerful LEMP stack for managing databases and serving dynamic content. Note: Fedora 24 is an older version that no longer receives security updates. For production environments, consider using a current Fedora version or other long-term support distributions. Installation Prerequisites Before starting, ensure your system is updated and you have root privileges. We'll install the LEMP stack components step by ...
Read MoreSetting Up LEMP Linux, Nginx, MySQL/MariaDB, PHP) and PhpMyAdmin on Ubuntu 15.04 Server
LEMP stack is a powerful combination of open source technologies used for web development and hosting. LEMP comprises Linux (the operating system), Nginx (pronounced "engine-x", a web server), MySQL/MariaDB (database management), and PHP (server-side scripting language). Note: Ubuntu 15.04 has reached end-of-life. This guide is for educational purposes. Consider using a current Ubuntu LTS version for production environments. Prerequisites Before starting the installation, ensure you have − Ubuntu 15.04 server with root or sudo access Internet connection for package downloads Basic command line knowledge Manual Installation Method Step 1: Update ...
Read MoreSetting Up LAMP (Linux, Apache, MariaDB and PHP) on Fedora 24 Server
Follow these instructions to install LAMP (Linux, Apache, MariaDB, and PHP) on a Fedora 24 server. LAMP stack provides a complete web development environment with Linux as the operating system, Apache as the web server, MariaDB as the database, and PHP for server-side scripting. Prerequisites: Ensure you have a fresh Fedora 24 server installation with root or sudo access and an active internet connection. Step 1: Update System First, update your system packages to ensure you have the latest versions ? sudo dnf update -y Step 2: Install Apache Web Server ...
Read More