Tag: Command
Designing Event Handling Framework using Command Design Pattern
In this article we will learn Command Design Pattern by Designing an Event Handling Framework. Intent of Command Design Pattern Encapsulate a request as an object, thereby letting you parametrize clients with different requests, queue or log requests, and support undo able operations.[GoF] Advertisements What a heavy Intent 🙂 Lets learn step by step, Frequently …
Designing Event Handling Framework using Command Design PatternRead More
How to get IP address of running docker container from host using inspect command ?
In this article we will discuss how to get ip address assigned to a running docker container from host using docker inspect command. docker inspect Docker command line interface provides a command docker inspect to get the low level information about the docker container i.e. Advertisements docker inspect <Option> <container name | ID > It …
How to get IP address of running docker container from host using inspect command ?Read More
Python: Get last N lines of a text file, like tail command
In this article, we will discuss a memory-efficient solution to read the last line or last N lines from a text or CSV file in python. Then we will also see how to real only last line or check if the last line in the file matches the given line. We have created a function …
Python: Get last N lines of a text file, like tail commandRead More
Linux: Create directory or folder using mkdir command
In this article we will discuss how to create a single or multiple directories in Linux using mkdir command. Then we will see various examples like, creating folders with space in name or creating folders with different permissions or creating nested directories recursively in single command. Table of Contents mkdir command – Introduction Create a …
Linux: Create directory or folder using mkdir commandRead More
Execute a program or call a system command in Python
In this Python tutorial, we will see how to execute an external program or call a system command in Python. Table Of Contents What is a System command Examples of System commands Run system command using call() function of subprocess module Run system command using run() function of subprocess module Run system command using system() …
Execute a program or call a system command in PythonRead More
How do you execute a system command in Python?
In this article we will learn to execute a system command in Python Programming Language. Table Of Contents Introduction Execute a system command in Python using the OS Module Execute a system command in Python using the Subprocess Module Summary Introduction Today we will be discussing about different methods using which we can execute system/shell …
Exclude a directory when using “find” command in Linux
While managing the linux servers we need to use the find command for finding files and directories based on our use case. In this article we want to learn about how to exclude a directory or multiple directories while using find command. Table Of Contents Using the prune option in find command Using “! -path” …
Exclude a directory when using “find” command in LinuxRead More
How to Use Linux Screen Command
Linux screen command is one of the most useful command whenever you perform a long-running task like zipping a huge directory or exporting a database from Linux terminal without getting interrupted by sudden connection drop or the SSH session termination. Well, this happened to everyone of us at some point. This is where the screen …
How to Uninstall Software in Ubuntu – Command Line
How to uninstall software in Ubuntu from command line. In this guide you are going to remove software packages on your Ubuntu server or system from command line. Using command line provide you more options and control over the software packages for removing. In this guide you are going to learn how to remove unused …
Create Users with useradd Command on Linux – Complete Guide
Create Users and Manage with useradd Command – Linux Complete Guide. In Linux and other Unix operating systems you can create multiple users and assign them to a group or multiple groups and provide necessary privileges to the new users. By default root user has the highest privilege on the system. In this guide you …
Create Users with useradd Command on Linux – Complete GuideRead More