Use ./ (Dot Slash) to execute script file?

Satish Kumar
Updated on 17-Mar-2026 09:01:38

2K+ Views

In Linux, ./ (dot slash) is used to execute script files located in the current directory. The dot (.) represents the current working directory, and the forward slash (/) is the path separator, so ./script.sh tells the shell to run the script from the current location. What Does Dot Slash Mean? The dot (.) in Linux represents the current working directory. When combined with the forward slash (/), it creates a relative path that points to files in your current location. For example: $ ls -l -rwxr-xr-x 1 user1 user1 156 Jun 12 19:09 script.sh -rw-r--r-- ... Read More

Date Command in Linux

Pradeep Jhuriya
Updated on 17-Mar-2026 09:01:38

18K+ Views

The date command in Linux is a fundamental utility used to display and manipulate the system date and time. This command is essential for system administration, logging, scheduling, and troubleshooting tasks. It provides extensive formatting options and can work with different time zones, making it invaluable for both basic users and system administrators. Basic Usage To display the current date and time, simply run the date command without any options: date Tue Jan 25 14:20:34 EST 2022 The default output format shows: Day Month Date Time TimeZone Year Formatting Output ... Read More

5 ‘stat’ Command Examples for Linux Newbies

Satish Kumar
Updated on 17-Mar-2026 09:01:38

439 Views

The stat command is one of the most useful utilities in Linux for examining detailed file and directory information. It provides comprehensive metadata about files including permissions, timestamps, sizes, and filesystem properties. This article explores five essential stat command examples that every Linux newcomer should know. Getting Basic File Information The simplest use of the stat command is to display comprehensive information about a file or directory. Simply use the following syntax − stat filename For example, to examine a file called example.txt − stat example.txt This command produces output ... Read More

What are the types of process scheduling algorithms and which algorithms lead to starvation?

Bhanu Priya
Updated on 17-Mar-2026 09:01:38

4K+ Views

Process scheduler assigns different processes to the CPU based on particular scheduling algorithms. Each algorithm has different characteristics regarding fairness, efficiency, and the potential for starvation — a condition where some processes may wait indefinitely. Types of Process Scheduling Algorithms The different types of process scheduling algorithms are as follows − FCFS (First Come First Serve) Jobs are executed on a first come first serve basis using a simple FIFO (First In First Out) queue. It is a non-preemptive algorithm where processes run to completion once started. While simple to implement, its performance is often poor ... Read More

How to Repeat Your Last Command in Linux?

Mukul Latiyan
Updated on 17-Mar-2026 09:01:38

7K+ Views

Linux terminal allows us to execute a variety of commands, and often we need to repeat a previously executed command. There are several efficient methods to recall and re-execute the last command without retyping it completely. For demonstration purposes, let's assume we previously ran the command ls -ltr and now want to repeat it using various methods available in Linux. Using Arrow Keys The most basic approach is to press the UP arrow key on your keyboard. This retrieves the last command from your command history, allowing you to press Enter to execute it again or modify ... Read More

Single Processor Systems

Alex Onsman
Updated on 17-Mar-2026 09:01:38

20K+ Views

A single processor system contains only one CPU that executes one process at a time. The processor selects processes from the ready queue and handles them sequentially. Most general-purpose computers use single processor systems as they are cost-effective and sufficient for everyday computing tasks. In a single processor system, even though multiple applications may be running simultaneously, only one process can actually execute at any given moment. The operating system uses time-sharing to create the illusion of parallel execution by rapidly switching between processes. Architecture of Single Processor Systems Single Processor System Architecture ... Read More

What is Thread cancellation?

Arnab Chakraborty
Updated on 17-Mar-2026 09:01:38

6K+ Views

Terminating a thread before it has completed is called thread cancellation. For example, if multiple threads are concurrently searching through a database and one thread returns the result, the remaining threads might be canceled. Another situation occurs when a user presses a stop button on a web browser to halt page loading. Often, a web page loads using several threads — each image is loaded in a separate thread. When the stop button is pressed, all threads loading the page are canceled. A thread that is to be canceled is often referred to as the target thread. Cancellation of ... Read More

How to read a Specific Line From a File in Linux?

Satish Kumar
Updated on 17-Mar-2026 09:01:38

15K+ Views

When working with the Linux command line, reading specific lines from text files is a common task. Rather than viewing entire files, you often need to extract just one particular line based on its line number. This article explores four different methods to read a specific line from a file using various Linux commands and utilities. Sample File Setup Let's create a sample file called test.txt to demonstrate these methods − $ nl test.txt 1 This is line 1, I don't have any interesting data. ... Read More

Redirect Output to location with Permission denied Error?

Satish Kumar
Updated on 17-Mar-2026 09:01:38

764 Views

The Permission denied error when redirecting output to root-owned files is a common issue in Linux systems. When using sudo command > file, the redirection operator (>) runs under the regular user's privileges, not as root, causing permission failures even when the command itself runs with sudo. Understanding the Problem Consider a file that requires root permissions for writing: kent$ ls -l /opt/output.txt -rw-r--r-- 1 root root 0 May 8 10:43 /opt/output.txt When attempting to redirect output as a regular user: kent$ echo "Linux is awesome!" > /opt/output.txt bash: /opt/output.txt: Permission denied ... Read More

How to backup and restore a Docker Container?

Raunak Jain
Updated on 17-Mar-2026 09:01:38

3K+ Views

Docker containers provide a packaged environment for applications, making them portable and lightweight while allowing version control. Sometimes you need to create snapshots or backups of running containers for emergency rollbacks or to preserve specific states. This article covers how to backup and restore Docker containers using built-in commands. Note: The backup methods described here work for containers with embedded data. For containers using separate data volumes, you must create separate backups for each volume. Backing up a Docker Container The backup process involves creating a snapshot of the container's current state and saving it as an ... Read More

Advertisements