Showing posts with the label ps Command

Featured Post

Python Regex: The 5 Exclusive Examples

 Regular expressions (regex) are powerful tools for pattern matching and text manipulation in Python. Here are five Python regex examples with explanations: 01 Matching a Simple Pattern import re text = "Hello, World!" pattern = r"Hello" result =, text) if result:     print("Pattern found:", Output: Output: Pattern found: Hello This example searches for the pattern "Hello" in the text and prints it when found. 02 Matching Multiple Patterns import re text = "The quick brown fox jumps over the lazy dog." patterns = [r"fox", r"dog"] for pattern in patterns:     if, text):         print(f"Pattern '{pattern}' found.") Output: Pattern 'fox' found. Pattern 'dog' found. It searches for both "fox" and "dog" patterns in the text and prints when they are found. 03 Matching Any Digit   import re text = "The price of the

How to Understand the 'ps' Command output in Linux

You can get process details by using the ps command. Those are number of processes running in a current Session, and other parameters about the process.   Here is all about how to use ps command in Linux. How to use ps command Here's an example that is how it appears when you issue the 'ps' command. PID (Process Id) - It is the process identification number. TTY(Terminal name) - associated with this process TIME(Time) - the format is hh: mm: ss (Hours, Minutes, and Seconds). Cumulated time of that particular process. CMD (Executable Command name). You May Also Like: PS Command Options in Linux How to understand slave/master terminal Here is all about Slave and Master terminal. The pts/0 is the slave terminal. The pts means pseudo terminal slave. Raise your knowledge by bringing in these quick definitions. LINUX - DIFFERENCE BETWEEN TTY AND PTS. In reality, the terminals are two types. One is ptmx (Master) and pts (Slave). The master terminal holds the details of slaves. Tho