<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: k1lgor</title>
    <description>The latest articles on DEV Community by k1lgor (@k1lgor).</description>
    <link>https://dev.to/k1lgor</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F711641%2F5f47c98a-5e7a-453e-a9d0-5ad3eed8c20d.jpeg</url>
      <title>DEV Community: k1lgor</title>
      <link>https://dev.to/k1lgor</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/k1lgor"/>
    <language>en</language>
    <item>
      <title>🧠 I Combined Two AI Powerhouse Skill Systems Into One Mega-Mind. Here's What Happened.</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Fri, 06 Mar 2026 18:03:23 +0000</pubDate>
      <link>https://dev.to/k1lgor/i-combined-two-ai-powerhouse-skill-systems-into-one-mega-mind-heres-what-happened-gf2</link>
      <guid>https://dev.to/k1lgor/i-combined-two-ai-powerhouse-skill-systems-into-one-mega-mind-heres-what-happened-gf2</guid>
      <description>&lt;p&gt;&lt;em&gt;How I merged the discipline of Superpowers with the expertise of Virtual Company to create the ultimate AI coding companion.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem: Too Many AI Personalities, Not Enough Flow
&lt;/h2&gt;

&lt;p&gt;If you've been using AI coding assistants like GitHub Copilot, Cursor, or Antigravity IDE, you've probably felt this pain:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You ask for a bug fix, and the AI refactors your entire codebase.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You want a quick feature, and it skips the tests entirely.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You need architecture advice, and it just starts coding.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The problem isn't the AI—it's the lack of &lt;em&gt;structured behavior&lt;/em&gt;. AI assistants are brilliant but chaotic. They need guardrails, workflows, and expertise routing.&lt;/p&gt;

&lt;p&gt;That's why I went down the rabbit hole of combining two of the most sophisticated AI skill systems out there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Superpowers&lt;/strong&gt; (by obra): 13 core workflow skills focused on disciplined development&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Virtual Company&lt;/strong&gt; (by k1lgor): 27 domain expert skills for specialized tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result? &lt;strong&gt;Mega-Mind&lt;/strong&gt; — a unified skill system with 41 skills that brings order to the chaos.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Makes These Systems Special?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Superpowers: The Discipline Framework
&lt;/h3&gt;

&lt;p&gt;Superpowers isn't about &lt;em&gt;what&lt;/em&gt; you code—it's about &lt;em&gt;how&lt;/em&gt; you approach coding. It introduces structured workflows like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brainstorming → writing-plans → test-driven-development →
executing-plans → verification-before-completion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every feature goes through the same rigorous process. No more jumping straight to implementation without thinking.&lt;/p&gt;

&lt;h3&gt;
  
  
  Virtual Company: The Expert Team
&lt;/h3&gt;

&lt;p&gt;Virtual Company treats your AI like a team of specialists:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tech-lead&lt;/code&gt; for architecture decisions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bug-hunter&lt;/code&gt; for debugging&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;security-reviewer&lt;/code&gt; for audits&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docker-expert&lt;/code&gt; for containerization&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ml-engineer&lt;/code&gt; for machine learning&lt;/li&gt;
&lt;li&gt;...and 22 more domain experts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of a generic AI, you get &lt;em&gt;the right specialist for the job&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Challenge: Two Systems, One Brain
&lt;/h2&gt;

&lt;p&gt;Here's where it got interesting. These systems had different philosophies:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Superpowers&lt;/th&gt;
&lt;th&gt;Virtual Company&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Process-driven&lt;/td&gt;
&lt;td&gt;Expertise-driven&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sequential workflows&lt;/td&gt;
&lt;td&gt;Domain specialists&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"Think before you code"&lt;/td&gt;
&lt;td&gt;"Get the right expert"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13 workflow skills&lt;/td&gt;
&lt;td&gt;27 domain skills&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;How do you combine process discipline with domain expertise?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The answer: Create an orchestrator that routes requests to the right skills &lt;em&gt;and&lt;/em&gt; ensures they follow the right workflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  Enter: The Mega-Mind Orchestrator
&lt;/h2&gt;

&lt;p&gt;I created a master skill called &lt;code&gt;/mega-mind&lt;/code&gt; that acts as the conductor of this orchestra:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌───────────────────────────────────────────────────────┐
│                    /mega-mind                         │
│                (Master Orchestrator)                  │
│                                                       │
│   ANALYZE → ROUTE → EXECUTE → VERIFY → REPORT         │
└───────────────────────────────────────────────────────┘
                         ↓
              ┌─────────────────────┐
              │   Target Skill(s)   │
              └─────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;User says:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I need to add user authentication with OAuth"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Mega-Mind responds:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🧠 Mega-Mind Orchestration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📋 Request Analyzed: New feature - User Authentication with OAuth

🔄 Routed to skill chain:
   1. tech-lead          → Define architecture
   2. brainstorming      → Explore OAuth providers
   3. api-designer       → Design auth API
   4. writing-plans      → Create implementation plan
   5. test-driven-development → Write auth tests
   6. backend-architect  → Implement auth service
   7. frontend-architect → Implement login UI
   8. security-reviewer  → Security audit
   9. verification-before-completion → Verify

📍 Starting with: tech-lead
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Analyzes&lt;/strong&gt; the request type (new feature)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routes&lt;/strong&gt; to the right skills in the right order&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Includes domain experts&lt;/strong&gt; (api-designer, security-reviewer)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforces workflow&lt;/strong&gt; (brainstorming before planning, TDD, verification)&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The Skill Routing Matrix
&lt;/h2&gt;

&lt;p&gt;One of my favorite parts is the automatic routing. Here's the decision tree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INCOMING REQUEST
       │
       ├─── Bug/Error? ───→ systematic-debugging → bug-hunter
       │
       ├─── New Feature? ───→ tech-lead → brainstorming → writing-plans
       │
       ├─── Performance? ───→ performance-profiler
       │
       ├─── Security? ───→ security-reviewer
       │
       ├─── DevOps? ───→ infra-architect → docker-expert → k8s-orchestrator
       │
       ├─── Data/ML? ───→ data-engineer → ml-engineer
       │
       └─── Documentation? ───→ doc-writer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No more guesswork. The system knows exactly which expert to call.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Complete Skill Arsenal
&lt;/h2&gt;

&lt;h3&gt;
  
  
  13 Core Workflow Skills (Process Discipline)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Skill&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;brainstorming&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Explore approaches before committing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;writing-plans&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create detailed implementation plans&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;executing-plans&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Execute with progress tracking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;test-driven-development&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Write tests first, implement second&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;systematic-debugging&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Root cause analysis methodology&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;verification-before-completion&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Prove it works before "done"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;requesting-code-review&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Structured review requests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;receiving-code-review&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Handle feedback systematically&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;finishing-a-development-branch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Clean branch wrap-up&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;using-git-worktrees&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Parallel development workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;single-flow-task-execution&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sequential task decomposition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;using-mega-mind&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Skill routing logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;writing-skills&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create new custom skills&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  27 Domain Expert Skills (Specialized Knowledge)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Skills&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Architecture&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;tech-lead, frontend-architect, backend-architect, infra-architect, api-designer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Development&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;code-polisher, migration-upgrader, mobile-architect, legacy-archaeologist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;test-genius, e2e-test-specialist, bug-hunter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DevOps&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ci-config-helper, docker-expert, k8s-orchestrator, observability-specialist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data/AI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;data-engineer, data-analyst, ml-engineer, search-vector-architect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;security-reviewer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;performance-profiler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Product&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;doc-writer, ux-designer, product-manager, workflow-orchestrator, skill-generator&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Real-World Example: Bug Fix Flow
&lt;/h2&gt;

&lt;p&gt;Let me show you how a simple bug report transforms into a rigorous fix:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Users are randomly getting logged out"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Mega-Mind routing:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. systematic-debugging
   → Reproduce the bug
   → Gather evidence
   → Form hypothesis

2. bug-hunter
   → Find root cause
   → Identify affected code

3. test-driven-development
   → Write regression test
   → Ensure bug is caught

4. verification-before-completion
   → Run all tests
   → Verify fix works
   → Check for side effects

5. finishing-a-development-branch
   → Clean commit
   → Ready to merge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bug isn't just "fixed" — it's properly debugged, tested, verified, and documented.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Anti-Patterns This Prevents
&lt;/h2&gt;

&lt;p&gt;I built this system to stop the bad habits we've all fallen into:&lt;/p&gt;

&lt;p&gt;❌ &lt;strong&gt;Skipping brainstorming&lt;/strong&gt; for complex features&lt;br&gt;
❌ &lt;strong&gt;Writing implementation before tests&lt;/strong&gt;&lt;br&gt;
❌ &lt;strong&gt;Marking tasks complete without verification&lt;/strong&gt;&lt;br&gt;
❌ &lt;strong&gt;Ignoring code review feedback&lt;/strong&gt;&lt;br&gt;
❌ &lt;strong&gt;Not documenting architectural decisions&lt;/strong&gt;&lt;br&gt;
❌ &lt;strong&gt;Using a generic approach for specialized tasks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every workflow has quality gates. Every skill has a purpose. Every request follows a proven path.&lt;/p&gt;


&lt;h2&gt;
  
  
  Installation: One Command
&lt;/h2&gt;

&lt;p&gt;I made installation as simple as possible for Antigravity IDE users:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone and run&lt;/span&gt;
git clone https://github.com/k1lgor/mega-mind-skills.git
&lt;span class="nb"&gt;cd &lt;/span&gt;mega-mind-skills
./install.sh /path/to/your/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or just copy the &lt;code&gt;.agent&lt;/code&gt; directory to your project root. That's it.&lt;/p&gt;

&lt;p&gt;Run the validation to make sure everything's in place:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash .agent/tests/run-tests.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;I'm using Mega-Mind daily in my development workflow, and the difference is night and day. My AI assistant now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Thinks before coding&lt;/strong&gt; (brainstorming → planning)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uses the right expert&lt;/strong&gt; (security-reviewer for auth, docker-expert for containers)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never skips tests&lt;/strong&gt; (TDD is mandatory in the workflow)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verifies everything&lt;/strong&gt; (no more "it works on my machine")&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The code quality has improved. The bug count has dropped. And I spend less time correcting AI mistakes.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;The entire system is open source and MIT licensed. All 41 skills, 6 workflows, 3 agent profiles, and the orchestrator are yours to use.&lt;/p&gt;

&lt;p&gt;📁 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/k1lgor/mega-mind-skills" rel="noopener noreferrer"&gt;mega-mind-skills&lt;/a&gt;&lt;br&gt;
📖 &lt;strong&gt;Documentation:&lt;/strong&gt; Included in the repo&lt;br&gt;
🧪 &lt;strong&gt;Tests:&lt;/strong&gt; 58 automated validation tests&lt;/p&gt;




&lt;h2&gt;
  
  
  Your Turn
&lt;/h2&gt;

&lt;p&gt;Have you tried structured AI skill systems? Do you use Superpowers, Virtual Company, or something else?&lt;/p&gt;

&lt;p&gt;I'd love to hear how you're bringing discipline to your AI-assisted development workflow. Drop a comment below! 👇&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this helpful, give it a ❤️ and follow for more AI development content!&lt;/em&gt;&lt;/p&gt;




</description>
      <category>ai</category>
      <category>antigravity</category>
      <category>agents</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Аз Съм Спартак! — The Pulse of a Football Community</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Sat, 28 Feb 2026 10:22:28 +0000</pubDate>
      <link>https://dev.to/k1lgor/az-sm-spartak-the-pulse-of-a-football-community-3dah</link>
      <guid>https://dev.to/k1lgor/az-sm-spartak-the-pulse-of-a-football-community-3dah</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/weekend-2026-02-28"&gt;DEV Weekend Challenge: Community&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🦅 The Community
&lt;/h2&gt;

&lt;p&gt;I built this project for the community of &lt;strong&gt;FC Spartak Varna&lt;/strong&gt; ("The Falcons"), one of Bulgaria's most historic football clubs. Currently, the club and its supporters are united in a massive fundraising campaign titled "Аз Съм Спартак" (I Am Spartak). The goal is to clear legacy debts and ensure the stable future of the club. This community is defined by intense loyalty, resilience, and a deep connection to their city and heritage.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I created a &lt;strong&gt;premium, minimalist landing page&lt;/strong&gt; designed to drive engagement for the fundraising campaign. Instead of a typical "salesy" interface, I focused on high-end aesthetics and emotional impact:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Heartbeat" Loading Screen&lt;/strong&gt;: An animated entry sequence that pulses with the phrase "Аз... Съм... СПАРТАК!" (I... Am... SPARTAK!) to build an immediate emotional bond.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cinematic Identity&lt;/strong&gt;: A custom-designed background integrating the official 1918 club logo with a powerful falcon silhouette.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimalist Tiers&lt;/strong&gt;: A clean, two-column layout presenting the donation levels (€200 and €500) and their specific community rewards (The Wall of Honor, Gold Letters in history).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Functional IBAN Integration&lt;/strong&gt;: A seamless copy-to-clipboard feature for bank transfers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://azsamspartak.fan/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fazsamspartak.fan%2Ffalcon_bg_new.png" height="auto" class="m-0"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://azsamspartak.fan/" rel="noopener noreferrer" class="c-link"&gt;
            Дарения за ФК Спартак Варна | Кампания „Аз съм Спартак“
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Подкрепете ФК Спартак Варна с дарителска карта, свободно дарение или банков превод. Вижте пакетите, банковите детайли и начините за подкрепа.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fazsamspartak.fan%2Ffavicon.png"&gt;
          azsamspartak.fan
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwxnorbpzdu2r48o092sv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwxnorbpzdu2r48o092sv.gif" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;You can find the full source code, built with performance and clean design in mind, here:&lt;br&gt;&lt;br&gt;


&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/k1lgor" rel="noopener noreferrer"&gt;
        k1lgor
      &lt;/a&gt; / &lt;a href="https://github.com/k1lgor/azsamspartak" rel="noopener noreferrer"&gt;
        azsamspartak
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Kампания за набиране на средства за ФК Спартак Варна. Аз съм Спартак!
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🦅 Аз Съм Спартак (I am Spartak) - Fundraising Landing Page&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A premium, minimalist landing page built for &lt;strong&gt;FC Spartak Varna&lt;/strong&gt;'s official fundraising campaign.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/k1lgor/azsamspartak/public/spartak-logo-official.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fk1lgor%2Fazsamspartak%2Fpublic%2Fspartak-logo-official.png" alt="FC Spartak Varna"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;⚽ The Mission&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;FC Spartak Varna is one of Bulgaria's most storied football clubs. This landing page aims to unify the community ("The Falcons") to clear heritage debts and secure the club's stable future. The campaign, titled &lt;strong&gt;"I Am Spartak"&lt;/strong&gt;, focuses on high-impact donations through donation cards and community support.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✨ Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Emotional Loading Screen:&lt;/strong&gt; A custom "Heartbeat" animation triggering the "Аз... Съм... СПАРТАК!" (I... Am... SPARTAK!) narrative.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cinematic Visuals:&lt;/strong&gt; A high-end background featuring a falcon silhouette integrated with the original club logo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimalist Design:&lt;/strong&gt; A clean, distraction-free interface focusing on the donation tiers and the mission.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Donation Tiers:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;🔹 Standard (€200)&lt;/li&gt;
&lt;li&gt;🔹 Premium (€500) - includes the "Wall of Honor" and "Golden Letters" in club history.&lt;/li&gt;
&lt;li&gt;🔹 Free donation choice.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Functional IBAN Details:&lt;/strong&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/k1lgor/azsamspartak" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;I wanted the site to be as fast and "lightweight" as a falcon, so I kept the tech stack modern and dependency-free:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React 19 &amp;amp; Vite&lt;/strong&gt;: For a blazing-fast core and modern component architecture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bun&lt;/strong&gt;: Used as the package manager and runtime for ultra-fast development cycles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vanilla CSS&lt;/strong&gt;: No heavy UI libraries. I used &lt;strong&gt;CSS Grid&lt;/strong&gt; for the responsive layout, &lt;strong&gt;CSS Animations&lt;/strong&gt; for the heartbeat effect, and &lt;strong&gt;Glassmorphism&lt;/strong&gt; to ensure text readability over the cinematic background.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lucide-React&lt;/strong&gt;: For crisp, minimalist iconography.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project shows how modern web design can serve local sports communities by turning a simple call for donations into a premium brand experience.&lt;/p&gt;

&lt;p&gt;Built by &lt;a class="mentioned-user" href="https://dev.to/k1lgor"&gt;@k1lgor&lt;/a&gt; — &lt;strong&gt;Semper 1918 Fidelis&lt;/strong&gt; 🔵🦅⚪️&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>showdev</category>
    </item>
    <item>
      <title>🏥 RepoDoctor - AI-Powered Repository Health Analysis with GitHub Copilot CLI</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Thu, 12 Feb 2026 20:17:51 +0000</pubDate>
      <link>https://dev.to/k1lgor/repodoctor-ai-powered-repository-health-analysis-with-github-copilot-cli-36l4</link>
      <guid>https://dev.to/k1lgor/repodoctor-ai-powered-repository-health-analysis-with-github-copilot-cli-36l4</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;h3&gt;
  
  
  RepoDoctor - Your Repository's AI Doctor 🩺
&lt;/h3&gt;

&lt;p&gt;RepoDoctor is a &lt;strong&gt;Copilot-first CLI tool&lt;/strong&gt; that revolutionizes how developers analyze and maintain their codebases. Instead of relying on rigid, hardcoded rules like traditional static analysis tools, RepoDoctor acts as an intelligent orchestrator that delegates all analysis logic to &lt;strong&gt;GitHub Copilot CLI&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think of it as having an AI-powered code doctor that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🍔 &lt;strong&gt;Diagnoses bloat&lt;/strong&gt; - Identifies large files, build artifacts, and missing hygiene files&lt;/li&gt;
&lt;li&gt;🌎 &lt;strong&gt;Creates onboarding guides&lt;/strong&gt; - Generates comprehensive TOUR.md files for new contributors&lt;/li&gt;
&lt;li&gt;🐳 &lt;strong&gt;Audits Dockerfiles&lt;/strong&gt; - Provides security and optimization recommendations&lt;/li&gt;
&lt;li&gt;💀 &lt;strong&gt;Detects dead code&lt;/strong&gt; - Finds unused code with confidence levels&lt;/li&gt;
&lt;li&gt;🔬 &lt;strong&gt;Performs health scans&lt;/strong&gt; - Multi-module analysis with overall health scoring&lt;/li&gt;
&lt;li&gt;📋 &lt;strong&gt;Generates reports&lt;/strong&gt; - Beautiful markdown reports from scan results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What makes RepoDoctor special?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional tools like ESLint, Pylint, or SonarQube use static rules that can't understand context. They tell you &lt;em&gt;what's wrong&lt;/em&gt; but not &lt;em&gt;why&lt;/em&gt; or &lt;em&gt;how to fix it&lt;/em&gt; in your specific situation.&lt;/p&gt;

&lt;p&gt;RepoDoctor is different because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Contextual AI Analysis&lt;/strong&gt; - Understands your tech stack, project structure, and patterns&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Actionable Recommendations&lt;/strong&gt; - Not just "this is bad," but "here's how to improve it"&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Zero Configuration&lt;/strong&gt; - No complex rule files or configuration needed&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Extensible Prompts&lt;/strong&gt; - Easy to add new analysis types with prompt templates&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Human-Readable Output&lt;/strong&gt; - Generates documentation, not just error lists&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why it matters to me:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a developer, I've spent countless hours:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Onboarding new team members who struggle to understand large codebases&lt;/li&gt;
&lt;li&gt;Debugging performance issues caused by bloated repositories&lt;/li&gt;
&lt;li&gt;Reviewing PRs with potential security issues in Docker configurations&lt;/li&gt;
&lt;li&gt;Hunting for dead code that clutters the codebase&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RepoDoctor solves these pain points by leveraging AI to provide &lt;strong&gt;intelligent, context-aware analysis&lt;/strong&gt; that actually helps developers improve their code quality.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/k1lgor/RepoDoctor" rel="noopener noreferrer"&gt;https://github.com/k1lgor/RepoDoctor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PyPI Package&lt;/strong&gt;: &lt;a href="https://pypi.org/project/repodoc/" rel="noopener noreferrer"&gt;https://pypi.org/project/repodoc/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation&lt;/strong&gt;: &lt;a href="https://github.com/k1lgor/RepoDoctor/blob/main/README.md" rel="noopener noreferrer"&gt;https://github.com/k1lgor/RepoDoctor/blob/main/README.md&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh5enid6phxrj1an09r2s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh5enid6phxrj1an09r2s.png" alt="repodoc" width="567" height="639"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgbg9571lm2id9lom9zbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgbg9571lm2id9lom9zbf.png" alt="repodoc-docker" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkn3d7y8s39xtg1v8dbr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkn3d7y8s39xtg1v8dbr.png" alt="repodoc-diet" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7xii8mcsxxcg5egqgm6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7xii8mcsxxcg5egqgm6.png" alt="repodoc-report" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbn49vj1qvdgd7qbw0sly.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbn49vj1qvdgd7qbw0sly.png" alt="repodoc-deadcode" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Installation &amp;amp; Usage
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install from PyPI&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;repodoc

&lt;span class="c"&gt;# Install from uv&lt;/span&gt;
uv &lt;span class="nb"&gt;install &lt;/span&gt;repodoc

&lt;span class="c"&gt;# Use repodoc without installation&lt;/span&gt;
uv tool run repodoc

&lt;span class="c"&gt;# Analyze repository bloat&lt;/span&gt;
repodoc diet

&lt;span class="c"&gt;# Generate onboarding guide&lt;/span&gt;
repodoc tour

&lt;span class="c"&gt;# Run full health scan&lt;/span&gt;
repodoc scan

&lt;span class="c"&gt;# Generate beautiful report&lt;/span&gt;
repodoc report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;Building RepoDoctor was a &lt;strong&gt;transformative experience&lt;/strong&gt; that fundamentally changed how I approach software development. GitHub Copilot CLI wasn't just a tool I used—it became the &lt;strong&gt;core architecture&lt;/strong&gt; of my entire application.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Copilot-First Architecture
&lt;/h3&gt;

&lt;p&gt;Instead of building traditional static analysis with hardcoded rules, I had a radical idea: &lt;strong&gt;What if the AI itself is the analysis engine?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This led to RepoDoctor's unique architecture:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Prompt Templates&lt;/strong&gt; - Each analysis type (diet, tour, docker, etc.) has a carefully crafted prompt&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow Orchestration&lt;/strong&gt; - RepoDoctor manages file discovery, data collection, and output formatting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Delegation&lt;/strong&gt; - All actual analysis logic is delegated to GitHub Copilot CLI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schema Validation&lt;/strong&gt; - Pydantic schemas ensure the AI returns structured, reliable data&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How I Used GitHub Copilot CLI
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Prompt Engineering as Code&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I created a sophisticated prompt template system that provides Copilot CLI with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context&lt;/strong&gt; - File listings, directory structure, key metrics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instructions&lt;/strong&gt; - Clear objectives and output format requirements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constraints&lt;/strong&gt; - What to focus on, what to ignore&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Examples&lt;/strong&gt; - Sample outputs to guide the AI&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. &lt;strong&gt;Iterative Development with Copilot CLI&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;During development, Copilot CLI helped me:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Generation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generated boilerplate for CLI commands with Typer&lt;/li&gt;
&lt;li&gt;Created Pydantic schemas for each analysis type&lt;/li&gt;
&lt;li&gt;Built async orchestration code for subprocess management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Debugging:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# When tests failed, I asked Copilot:&lt;/span&gt;
copilot &lt;span class="s2"&gt;"Why is this pytest fixture not mocking shutil.which correctly?"&lt;/span&gt;
copilot &lt;span class="s2"&gt;"How do I handle UTF-8 encoding on Windows for subprocess output?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Architecture Decisions:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;copilot &lt;span class="s2"&gt;"Should I use sync or async for subprocess calls to GitHub Copilot CLI?"&lt;/span&gt;
copilot &lt;span class="s2"&gt;"What's the best way to cache analysis results for the report command?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. &lt;strong&gt;AI-Powered Documentation Generation&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;tour&lt;/strong&gt; command is my favorite feature—it uses Copilot CLI to generate comprehensive onboarding guides by analyzing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project structure&lt;/li&gt;
&lt;li&gt;Code patterns&lt;/li&gt;
&lt;li&gt;Tech stack&lt;/li&gt;
&lt;li&gt;Dependencies&lt;/li&gt;
&lt;li&gt;Common workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This would have taken hours to write manually, but Copilot CLI generates it in seconds with &lt;strong&gt;context-aware understanding&lt;/strong&gt; of the codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Leveraging Agent Skills
&lt;/h3&gt;

&lt;p&gt;One of my secret weapons during development was my &lt;strong&gt;&lt;a href="https://github.com/k1lgor/virtual-company" rel="noopener noreferrer"&gt;Virtual Company&lt;/a&gt;&lt;/strong&gt; project—a collection of 27 specialized agent skills that enhance AI agents with domain-specific expertise.&lt;/p&gt;

&lt;p&gt;These skills act as expert personas that guide GitHub Copilot CLI through complex workflows.&lt;/p&gt;

&lt;p&gt;These skills transformed GitHub Copilot CLI from a general assistant into a &lt;strong&gt;team of specialized experts&lt;/strong&gt;, each bringing deep domain knowledge to different aspects of the project. It's like having a senior developer, tech writer, QA engineer, and DevOps specialist all working together!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Virtual Company is open source&lt;/strong&gt;: &lt;a href="https://github.com/k1lgor/virtual-company" rel="noopener noreferrer"&gt;https://github.com/k1lgor/virtual-company&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Impact on My Development Experience
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Before GitHub Copilot CLI:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ Spent hours writing static analysis rules&lt;/li&gt;
&lt;li&gt;❌ Struggled with complex regex patterns&lt;/li&gt;
&lt;li&gt;❌ Wrote boilerplate code manually&lt;/li&gt;
&lt;li&gt;❌ Context-switched between docs and coding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;With GitHub Copilot CLI + Virtual Company Skills:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;10x faster development&lt;/strong&gt; - Instant code generation and debugging&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Expert-level guidance&lt;/strong&gt; - Each skill provides specialized domain knowledge&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Better architecture&lt;/strong&gt; - Copilot with tech-lead skill suggested async patterns I wouldn't have considered&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Fewer bugs&lt;/strong&gt; - AI-reviewed code with bug-hunter skill before I even ran it&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;More creativity&lt;/strong&gt; - Spent time on features, not implementation details&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Continuous learning&lt;/strong&gt; - Copilot taught me new Python patterns and best practices&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Comprehensive testing&lt;/strong&gt; - Test-genius skill helped achieve 48 passing tests with proper mocking&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Meta Experience
&lt;/h3&gt;

&lt;p&gt;The most mind-bending part? &lt;strong&gt;I built a tool powered by GitHub Copilot CLI, while using GitHub Copilot CLI to build it.&lt;/strong&gt; 🤯&lt;/p&gt;

&lt;p&gt;It was like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using Copilot CLI to debug Copilot CLI integration&lt;/li&gt;
&lt;li&gt;Asking Copilot to generate prompts for Copilot&lt;/li&gt;
&lt;li&gt;Having Copilot help me test code that invokes Copilot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This recursive AI-assisted development felt like a glimpse into the future of software engineering.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;AI-First Architecture is Real&lt;/strong&gt; - RepoDoctor proves you can build production tools with AI as the core logic engine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt Engineering Matters&lt;/strong&gt; - The quality of your prompts directly impacts output quality&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specialized Skills Amplify AI&lt;/strong&gt; - Using domain-specific agent skills (Virtual Company) accelerates development exponentially&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copilot CLI for Everything&lt;/strong&gt; - From code generation to debugging to documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ship Faster, Iterate Smarter&lt;/strong&gt; - Copilot CLI enabled rapid prototyping and validation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Future is AI-Native&lt;/strong&gt; - Tools will increasingly delegate intelligence to AI rather than hardcode it&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Try RepoDoctor Today!
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv &lt;span class="nb"&gt;install &lt;/span&gt;repodoc
&lt;span class="nb"&gt;cd &lt;/span&gt;your-project
repodoc scan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/k1lgor/RepoDoctor" rel="noopener noreferrer"&gt;https://github.com/k1lgor/RepoDoctor&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PyPI&lt;/strong&gt;: &lt;a href="https://pypi.org/project/repodoc/" rel="noopener noreferrer"&gt;https://pypi.org/project/repodoc/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ and 🤖 by &lt;a class="mentioned-user" href="https://dev.to/k1lgor"&gt;@k1lgor&lt;/a&gt; using GitHub Copilot CLI&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>Solving the Knapsack Problem - A Guide to Dynamic Programming</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Thu, 11 May 2023 20:05:25 +0000</pubDate>
      <link>https://dev.to/k1lgor/solving-the-knapsack-problem-a-guide-to-dynamic-programming-50h0</link>
      <guid>https://dev.to/k1lgor/solving-the-knapsack-problem-a-guide-to-dynamic-programming-50h0</guid>
      <description>

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The Knapsack problem is a well-known optimization problem in computer science. Given a set of items, each with a weight and a value, the problem is to select a subset of the items that maximizes the total value while keeping the total weight below a certain limit. The problem gets its name from the idea of packing a knapsack with items of varying sizes and values.&lt;/p&gt;

&lt;p&gt;The Knapsack problem is a classic example of a dynamic programming problem, which means that we can solve it efficiently by breaking it down into smaller subproblems and combining the solutions to those subproblems to find the optimal solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Dynamic Programming Solution&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The key idea behind the dynamic programming solution to the Knapsack problem is to build a table (often called a "DP table") where each cell represents the optimal value for a particular combination of items and weights. The table is initialized with zeros, and then filled in using a recursive formula.&lt;/p&gt;

&lt;p&gt;In the recursive formula, we consider each item in turn, and for each item, we consider all possible weights up to the maximum weight. If the weight of the current item is greater than the current weight, we cannot include the item, so we simply use the value from the previous row in the table. If the weight of the current item is less than or equal to the current weight, we have a choice: we can either include the item, in which case we add its value to the value of the optimal solution for the remaining weight, or we can exclude the item, in which case we simply use the value from the previous row in the table.&lt;/p&gt;

&lt;p&gt;After filling in the entire table, we can use it to backtrack and find the selected items that give us the maximum value. Starting from the bottom right corner of the table, we check each cell to see if its value is different from the value in the cell above it. If it is, that means we included the item corresponding to that row in the optimal solution, so we add it to our list of selected items and move to the cell in the previous row with the remaining weight.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;The Python Implementation&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here is a Python implementation of the Knapsack algorithm using dynamic programming:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;knapsack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Initialize a 2D array with zeros
&lt;/span&gt;    &lt;span class="n"&gt;dp_table&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_weight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;

    &lt;span class="c1"&gt;# Fill the table with the optimal values for each weight and item combination
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_weight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;weight&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;dp_table&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dp_table&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;dp_table&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dp_table&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;dp_table&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# Backtrack to find the selected items
&lt;/span&gt;    &lt;span class="n"&gt;selected_items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;max_weight&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;dp_table&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;dp_table&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
            &lt;span class="n"&gt;selected_items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
            &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="c1"&gt;# Return the total value and selected items
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;dp_table&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;selected_items&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="n"&gt;max_weight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;

    &lt;span class="n"&gt;total_value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;selected_items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;knapsack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Total value:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total_value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Selected items:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;selected_items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;knapsack&lt;/code&gt; function takes two arguments: a list of items, where each item is represented as a tuple of the form &lt;code&gt;(weight, value)&lt;/code&gt;, and a maximum weight. The function returns a tuple containing the total value of the selected items and the list of selected items themselves.&lt;/p&gt;

&lt;p&gt;We have four items with weight and values &lt;code&gt;(2, 3)&lt;/code&gt;, &lt;code&gt;(3, 4)&lt;/code&gt;, &lt;code&gt;(4, 5)&lt;/code&gt;, and &lt;code&gt;(5, 6)&lt;/code&gt;. We want to find the subset of items that maximizes the total value while keeping the total weight below 8. Running the &lt;code&gt;knapsack&lt;/code&gt; function with these arguments gives us the following output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;Total&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;span class="n"&gt;Selected&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means that the optimal subset of items has a total value of 10, and consists of the items with weight and values &lt;code&gt;(5, 6)&lt;/code&gt; and &lt;code&gt;(3, 4)&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The Knapsack problem is a classic optimization problem that can be efficiently solved using dynamic programming. The key idea is to build a table that represents the optimal value for each combination of items and weights, and then fill it in using a recursive formula. The resulting table can be used to backtrack and find the selected items that give us the maximum value.&lt;/p&gt;

&lt;p&gt;In this article, I have shown how to implement the Knapsack algorithm in Python using dynamic programming, and provided an example of how to use it. While this implementation is relatively simple, there are many variations of the Knapsack problem with different constraints and objectives, and more sophisticated algorithms may be needed to solve them efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>algorithms</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Understanding Linux Commands - A Comprehensive Guide</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Sat, 22 Apr 2023 11:38:18 +0000</pubDate>
      <link>https://dev.to/k1lgor/understanding-linux-commands-a-comprehensive-guide-4o02</link>
      <guid>https://dev.to/k1lgor/understanding-linux-commands-a-comprehensive-guide-4o02</guid>
      <description>

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you’re new to Linux or have recently switched to it, you may have been overwhelmed by the vast array of commands you can use within it. These commands have a different syntax than those you might be used to in Windows or Mac systems; however, once you have an understanding of how they work, using Linux commands becomes easy and straightforward.&lt;/p&gt;

&lt;p&gt;In this article, we’ll provide you with a comprehensive guide on complex Linux commands. We’ll explain what they are, how they work, and how you can use them to optimize your work processes. Let's get started!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;What are Linux Commands?&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Linux commands are text-based instructions that you can use within a Linux terminal. They can help you to execute specific tasks and communicate with your computer's operating system. The terminal is a text-based interface that you can access by typing in specific commands. You can achieve several tasks, such as copying files, starting programs, or updating your system, using only commands.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Basic Linux Commands&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let’s begin with some basic commands. These commands are used frequently and are an essential part of mastering the Linux terminal.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt;: This command lists all the files and directories in your current location. You can use the &lt;code&gt;-a&lt;/code&gt; option to display hidden files, and the &lt;code&gt;-l&lt;/code&gt; option to display them in long format.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt;: The &lt;code&gt;cd&lt;/code&gt; command is used to change directories. For example, &lt;code&gt;cd Downloads&lt;/code&gt; will take you to the Downloads directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pwd&lt;/code&gt;: This command displays the working directory in your terminal.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt;: The &lt;code&gt;mkdir&lt;/code&gt; command is used to make a new directory. For example, to create a folder called ‘test’, you can use the command &lt;code&gt;mkdir test&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm&lt;/code&gt;: The &lt;code&gt;rm&lt;/code&gt; command is used to remove files, and it's often used with the &lt;code&gt;-rf&lt;/code&gt; option to remove directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cp&lt;/code&gt;: This command is used to copy files and directories from one location to another.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mv&lt;/code&gt;: This command is used to move files and directories from one location to another.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Intermediate Linux Commands&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now that you are familiar with some basic Linux commands let's look at a few intermediate level commands to enhance your Linux knowledge.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;grep&lt;/code&gt;: This command is used to search for a specific word or pattern within a file. For example, to look for the word ‘example’ in a file called ‘file.txt’, you can run the command &lt;code&gt;grep example file.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;find&lt;/code&gt;: The &lt;code&gt;find&lt;/code&gt; command is used to search through a directory's contents recursively. You can use it with different options such as &lt;code&gt;-name&lt;/code&gt; to specify filenames or &lt;code&gt;-size&lt;/code&gt; to search for specific file sizes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ps&lt;/code&gt;: The &lt;code&gt;ps&lt;/code&gt; command lets you view the currently running processes on your system. You can use it with different options such as &lt;code&gt;-ef&lt;/code&gt; to display all processes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wget&lt;/code&gt;: The &lt;code&gt;wget&lt;/code&gt; command lets you download files from the internet. For example, to download a file called &lt;code&gt;test.txt&lt;/code&gt;, you can use &lt;code&gt;wget https://www.example.com/test.txt&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Advanced Linux Commands&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here are few advanced Linux commands that are rarely used but can be helpful in certain situations.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;dd&lt;/code&gt;: The &lt;code&gt;dd&lt;/code&gt; command is used to copy and convert data. For example, to create a bootable USB drive using an ISO file, you can use the command &lt;code&gt;sudo dd if=path/to/iso of=/dev/sdb bs=4M; sync&lt;/code&gt;. Make sure to use the correct input and output file locations.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tar&lt;/code&gt;: The &lt;code&gt;tar&lt;/code&gt; command is used to create compressed archives. For example, to create a &lt;code&gt;.tar.gz&lt;/code&gt; archive of all files in the current directory, you can use the command &lt;code&gt;tar -czvf archive_name.tar.gz *&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;awk&lt;/code&gt;: The &lt;code&gt;awk&lt;/code&gt; command is used to manipulate text files. For example, to print the first column of a tab-separated values file, you can run the command &lt;code&gt;awk -F'\t' '{print $1}' file.txt&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Security-focused Linux Commands&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Linux commands are powerful tools that can be used to perform various security-focused tasks such as user management, file permissions, and network security. In this section, we will take a look at some of the most commonly used security-focused Linux commands.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;chmod&lt;/code&gt;: This command is used to change the permissions of a file or directory. The permissions can be specified using a numerical code or a symbolic code.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;passwd&lt;/code&gt;: This command is used to change the password of a user account. The user is prompted to enter their old password, followed by their new password.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sftp&lt;/code&gt;: This command is used to securely transfer files over the network. It uses the SSH protocol to encrypt the data being transferred.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;iptables&lt;/code&gt;: This command is used to manage network security by setting up rules for incoming and outgoing traffic. It can be used to block specific IP addresses or protocols.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ssh&lt;/code&gt;: This command is used to establish a secure remote connection to another computer. It uses the SSH protocol to encrypt the data being transferred.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By using these security-focused Linux commands, you can help protect your computer and network from potential security threats.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Linux commands can seem intimidating, but once you know how they work, they become extremely useful tools. We hope this guide provided a good starting point for mastering Linux commands. Keep practicing, and you'll soon be using Linux like a pro!&lt;/p&gt;

&lt;p&gt;If you want to learn more about Linux, check out the &lt;a href="https://www.tldp.org/" rel="noopener noreferrer"&gt;Linux Documentation Project&lt;/a&gt; or join the &lt;a href="https://www.reddit.com/r/linux/" rel="noopener noreferrer"&gt;Linux subreddit&lt;/a&gt; to connect with other users. Happy coding!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Mastering the ssh Command - Tips and Tricks</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Sun, 09 Apr 2023 15:29:53 +0000</pubDate>
      <link>https://dev.to/k1lgor/mastering-the-ssh-command-tips-and-tricks-858</link>
      <guid>https://dev.to/k1lgor/mastering-the-ssh-command-tips-and-tricks-858</guid>
      <description>

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you've ever needed to remotely access another computer, then you're probably familiar with the 'ssh' command. This powerful tool is used to securely connect to and manage remote systems, and it can be incredibly helpful for system administrators, developers, and anyone who needs to work on a remote machine. In this blog post, we'll explore some tips and tricks for using the 'ssh' command like a pro.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Basic Usage&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before we dive into some more advanced features, let's review the basic usage of the &lt;code&gt;ssh&lt;/code&gt; command. To establish an SSH connection, simply type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh username@hostname
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;username&lt;/code&gt; with your username on the remote system, and &lt;code&gt;hostname&lt;/code&gt; with the IP address or domain name of the remote system. You may also need to specify a port number using the &lt;code&gt;-p&lt;/code&gt; flag if the SSH server is running on a non-standard port.&lt;/p&gt;

&lt;p&gt;Once you enter this command, you'll be prompted to enter your password for the remote system. If everything goes well, you'll be connected to the remote machine and can start running commands as if you were logged in locally.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Advanced Usage&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now that we've covered the basics, let's take a look at some more advanced features of the &lt;code&gt;ssh&lt;/code&gt; command.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Publick Key Authentication&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Typing in your password every time you want to connect to a remote system can be a hassle, but luckily &lt;code&gt;ssh&lt;/code&gt; supports public key authentication. This allows you to log in without typing your password, as long as you have a public key installed on the remote system. Here's how to set it up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate a public/private key pair on your local machine using the &lt;code&gt;ssh-keygen&lt;/code&gt; command. Make sure to keep your private key safe and secure.&lt;/li&gt;
&lt;li&gt;Copy your public key to the remote system using the &lt;code&gt;ssh-copy-id&lt;/code&gt; command. This will automatically add your public key to the remote system's authorized keys list.&lt;/li&gt;
&lt;li&gt;Now, when you connect to the remote system, you should be able to log in without typing your password.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Proxying Connections&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sometimes, you may need to connect to a remote system through an intermediate server. This is where proxying comes in handy. To set up a proxy connection, use the &lt;code&gt;-J&lt;/code&gt; flag followed by the hostname of the intermediate server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-J&lt;/span&gt; username@intermediate_host username@destination_host
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will establish a connection to the intermediate server first, and then to the final destination.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Port Forwarding&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Port forwarding is a way to forward network traffic from one port on your local machine to a port on a remote machine, through an SSH tunnel. This can be incredibly helpful for accessing services that are not available directly from your local network. Here's an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-L&lt;/span&gt; 8080:localhost:80 username@remote_host
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will forward all traffic from port 8080 on your local machine to port 80 on the remote host. Now, if you open a web browser on your local machine and navigate to &lt;code&gt;localhost:8080&lt;/code&gt;, you'll see the website that's hosted on the remote machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ssh&lt;/code&gt; command is a powerful tool that can be incredibly helpful for managing remote systems. By mastering some of the advanced features we've covered in this blog post, you'll be able to work more efficiently and securely on remote machines. Whether you're a system administrator or a developer, understanding the &lt;code&gt;ssh&lt;/code&gt; command is an essential skill for anyone who needs to work with remote systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Mastering the Powerful Linux Command - rsync</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Sat, 01 Apr 2023 13:21:15 +0000</pubDate>
      <link>https://dev.to/k1lgor/mastering-the-powerful-linux-command-rsync-1bd0</link>
      <guid>https://dev.to/k1lgor/mastering-the-powerful-linux-command-rsync-1bd0</guid>
      <description>

&lt;p&gt;As a Linux user, you are already familiar with basic commands like &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cd&lt;/code&gt;, and &lt;code&gt;rm&lt;/code&gt;. But have you ever heard of rsync? It's one of the most powerful and versatile commands in Linux, and it can save you a lot of time and effort when working with large files and directories. In this post, we'll dive deep into the world of &lt;code&gt;rsync&lt;/code&gt; and show you how to yse it to its full potential.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before we get started, let's talk about what &lt;code&gt;rsync&lt;/code&gt; actually is. &lt;code&gt;Rsync&lt;/code&gt; stands for "remote synchronization", and it's a command-line utility that allows you to copy files and directories between different locations, either on the same computer or over a network.&lt;/p&gt;

&lt;p&gt;What makes &lt;code&gt;rsync&lt;/code&gt; so powerful is its ability to transfer only the parts of files that have changed, rather than copying the entire file every time. This means that &lt;code&gt;rsync&lt;/code&gt; can save you a lot of time and bandwidth when transferring large files, especially over slow or unreliable connections.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Basic Usage&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The basic syntax for using &lt;code&gt;rsync&lt;/code&gt; is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rsync &lt;span class="nb"&gt;source &lt;/span&gt;destination
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, if you want to copy all the files in the directory &lt;code&gt;/home/user/Documents&lt;/code&gt; to &lt;code&gt;/mnt/backup&lt;/code&gt;, you would use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rsync /home/user/Documents /mnt/backup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default, &lt;code&gt;rsync&lt;/code&gt; will copy all files and subdirectories from the source directory to the destination directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Advanced Usage&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;While the basic usage of &lt;code&gt;rsync&lt;/code&gt; is straightforward, there are many advanced options that can help you fine-tune the way &lt;code&gt;rsync&lt;/code&gt; works. Here are some of the most useful options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--recursive&lt;/code&gt;: This option tells &lt;code&gt;rsync&lt;/code&gt; to opy all files and subdirectories recursively, including any empty directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--delete&lt;/code&gt;: This option tells &lt;code&gt;rsync&lt;/code&gt; to delete any files in the destination directory that are not present in the source directory. This is useful for keeping two directories in sync.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--progress&lt;/code&gt;: This options shows the progress of the file transfer in real-time, which can be useful when transferring large files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--exclude&lt;/code&gt;: This option allows you to exclude certain files or directories from the transfer. For example, if you want to exclude all files with the extention &lt;code&gt;.log&lt;/code&gt;, you would use the following command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rsync &lt;span class="nt"&gt;--exclude&lt;/span&gt; &lt;span class="s1"&gt;'*.log'&lt;/span&gt; &lt;span class="nb"&gt;source &lt;/span&gt;destination
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Tips and Tricks&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here are some additional tips and tricks to help you get the most out of &lt;code&gt;rsync&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always use the &lt;code&gt;-v&lt;/code&gt; option for verbose output. This will help you see exactly what &lt;code&gt;rsync&lt;/code&gt; is doing during the transfer.&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;-h&lt;/code&gt; option to display file sizes in a human-readable format (e.g., "10MB" instead of "10485760")&lt;/li&gt;
&lt;li&gt;If you are transferring a large number of files, consider using the &lt;code&gt;--partial&lt;/code&gt; option, which allows &lt;code&gt;rsync&lt;/code&gt; to resume interrupted transfers.&lt;/li&gt;
&lt;li&gt;If you are transferring files over a network, use the &lt;code&gt;-z&lt;/code&gt; option to enable compression, which can save you bandwidth.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Rsync&lt;/code&gt; is a powerful and versatile command that can help you save time and effort when working with large files and directories. Whether you are transferring files over a network or backing up your data to an external drive, &lt;code&gt;rsync&lt;/code&gt; has the tools you need to get the job done. With the tips and tricks we've covered in this post, you'll be able to use &lt;code&gt;rsync&lt;/code&gt; to its full potential and become a master of this powerful Linux command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Navigating Your Linux System with the cd Command</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Sun, 26 Mar 2023 15:46:22 +0000</pubDate>
      <link>https://dev.to/k1lgor/navigating-your-linux-system-with-the-cd-command-2ljf</link>
      <guid>https://dev.to/k1lgor/navigating-your-linux-system-with-the-cd-command-2ljf</guid>
      <description>

&lt;p&gt;As a Linux user, navigating through the file system is an essential part of your daily routine. You may find yourself constantly moving from one directory to another in the terminal. That's where the &lt;code&gt;cd&lt;/code&gt; command comes in handy. In this blog post, we'll take a deep dive into the &lt;code&gt;cd&lt;/code&gt; command, its different options, and some practical examples to help you navigate through your Linux system with ease.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Basic Usage&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;cd&lt;/code&gt; command stands for "change directory", and it's used to move from one directory to another. The basic syntax of the command is as follows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd [directory]&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Where &lt;code&gt;directory&lt;/code&gt; is the path to the directory you want to move into. For example, to move into the home directory, you can use the command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd ~&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Or simply:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Which takes you to your home directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Moving Up and Down the Directory Tree&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In addition to moving into a specific directory, you can also move up and down the directory tree using the &lt;code&gt;cd&lt;/code&gt; command. To move up one directory level, use the command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd ..&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This command takes you to the parent directory of the current directory you're in. You can repeat the command to move up multiple levels at once. For example, if you're in the directory &lt;code&gt;/home/user/Documents/projects/&lt;/code&gt;, the command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd ../../../&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Will take you up three levels to the &lt;code&gt;/home/user/&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;To move down the directory tree, you can use the &lt;code&gt;cd&lt;/code&gt; command followed by the directory name. For example, to move from the home directory to the documents directory, use the command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd Documents&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Useful Options&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;cd&lt;/code&gt; command comes with some useful options that can make navigating through your Linux system even more efficient. Here are a few:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-P&lt;/code&gt; (or &lt;code&gt;--physical&lt;/code&gt;) option: This option makes the &lt;code&gt;cd&lt;/code&gt; command follow symbolic links, so you end up in the physical directory. For example, if you have a symbolic link &lt;code&gt;mylink&lt;/code&gt; that points to &lt;code&gt;/home/user/mydir&lt;/code&gt;, the command:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd -P mylink&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Will take you to the &lt;code&gt;/home/user/mydir&lt;/code&gt; directory, rather than the directory where the symbolic link is located.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-L&lt;/code&gt; (or &lt;code&gt;--logical&lt;/code&gt;) option: This option is the opposite of the &lt;code&gt;-P&lt;/code&gt; option. It makes the &lt;code&gt;cd&lt;/code&gt; command follow symbolic links, so you end up in the logical directory. For example, using the same symbolic link &lt;code&gt;mylink&lt;/code&gt; as above, the command:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd -L mylink&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Will take you to the directory where the symbolic link is located, rather than the directory it points to.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Tips and Tricks&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use tab completion: The &lt;code&gt;cd&lt;/code&gt; command supports tab completion, which can save you time and prevent typing errors. Simply type the first few letters of the directory name, then press the &lt;code&gt;tab&lt;/code&gt; key to complete it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;code&gt;cd&lt;/code&gt; with other commands: You can use the &lt;code&gt;cd&lt;/code&gt; command with other Linux commands to perform operations in a specific directory. For example, to list the files in the documents directory, use the command:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd Documents &amp;amp;&amp;amp; ls&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This command first moves you to the documents directory, then lists its contents using the &lt;code&gt;ls&lt;/code&gt; command.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use absolute paths: Instead of typing the entire path to a directory, you can use the absolute path to save time. For example, instead of typing:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd /home/user/Documents/projects/project1&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd ~/Documents/projects/project1&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This takes you to the same directory but is shorter and easier to type.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In conclusion, the &lt;code&gt;cd&lt;/code&gt; command is a powerful tool that allows you to navigate your file system with ease. By understanding how to use this command effectively, you can save time and improve your productivity when working on the command line. Remember to use absolute or relative paths depending on your needs, and take advantage of the &lt;code&gt;~&lt;/code&gt; and &lt;code&gt;-&lt;/code&gt; shortcuts to quickly navigate to frequently accessed directories. Additionally, always pay attention to the output of the &lt;code&gt;cd&lt;/code&gt; command to ensure that you are moving to the correct directory. With these tips and tricks in mind, you'll be a &lt;code&gt;cd&lt;/code&gt; command pro in no time!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Mastering Text Manipulation with the Cut Command in Linux</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Sun, 26 Mar 2023 15:16:01 +0000</pubDate>
      <link>https://dev.to/k1lgor/mastering-text-manipulation-with-the-cut-command-in-linux-1icm</link>
      <guid>https://dev.to/k1lgor/mastering-text-manipulation-with-the-cut-command-in-linux-1icm</guid>
      <description>

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When it comes to working with Linux, the command line is a powerful tool that can make your life much easier. While there are many commands available, one that is particularly useful for manipulating text data is &lt;code&gt;cut&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;The Power of cut&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;cut&lt;/code&gt; command is used to extract specified sections from each line of a file or input. By default, &lt;code&gt;cut&lt;/code&gt; extracts every character from the beginning to the end of each line. However, it can be used to extract specific fields, columns or sections of a line based on a delimiter or a character position.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Examples&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For example, suppose we have a file called &lt;code&gt;data.txt&lt;/code&gt; that contains the following lines of data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;John,Smith,25,USA
Maria,Garcia,32,Mexico
Ahmed,Khan,45,Pakistan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we want to extract only the first names, we can use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="s1"&gt;','&lt;/span&gt; &lt;span class="nt"&gt;-f1&lt;/span&gt; data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells &lt;code&gt;cut&lt;/code&gt; to use the comma &lt;code&gt;,&lt;/code&gt; as the delimiter and extract only the first field of each line, which contains the first name. The output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;John
Maria
Ahmed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also use &lt;code&gt;cut&lt;/code&gt; to extract a range of characters from each line. For example, to extract only the first three characters of each line from our &lt;code&gt;data.txt&lt;/code&gt; file, we can use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-c1-3&lt;/span&gt; data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Joh
Mar
Ahm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another useful feature of &lt;code&gt;cut&lt;/code&gt; is the ability to extract a specific column from a file that does not use a delimiter. For example, suppose we have a file called &lt;code&gt;numbers.txt&lt;/code&gt; that contains the following data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;1234
5678
9101
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To extract the second column (i.e., the second digit of each number), we can use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-c2&lt;/span&gt; numbers.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;2
6
1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Tips&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here are some additional tips for using the &lt;code&gt;cut&lt;/code&gt; command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To extract the last field of each line, use the &lt;code&gt;-f&lt;/code&gt; option with a negative value. For example, to extract the countries from our &lt;code&gt;data.txt&lt;/code&gt; file, we can use the following command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="s1"&gt;','&lt;/span&gt; &lt;span class="nt"&gt;-f4&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-s&lt;/code&gt; option tells &lt;code&gt;cut&lt;/code&gt; to suppress lines that do not contain the delimiter.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To extract a range of characters from each line using a specific delimiter, use the &lt;code&gt;-d&lt;/code&gt; option followed by the delimiter and the &lt;code&gt;-c&lt;/code&gt; option followed by the starting and ending character positions. For example, suppose we have a file called &lt;code&gt;emails.txt&lt;/code&gt; that contains the following data:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;john.smith@example.com
maria.garcia@example.com
ahmed.khan@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To extract only the domain names (i.e., the text after the &lt;code&gt;@&lt;/code&gt; symbol) from each line, we can use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="s1"&gt;'@'&lt;/span&gt; &lt;span class="nt"&gt;-f2&lt;/span&gt; emails.txt | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="s1"&gt;'.'&lt;/span&gt; &lt;span class="nt"&gt;-f1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;example
example
example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With the &lt;code&gt;cut&lt;/code&gt; command, you can quickly and easily manipulate text data in Linux. Whether you need to extract specific fields from a file, extract a range of characters from each line, or extract a specific column from a file that does not use a delimiter, &lt;code&gt;cut&lt;/code&gt; is a powerful tool that can save you time and effort. So next time you're working with text data in Linux, be sure to give &lt;code&gt;cut&lt;/code&gt; a try!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Efficiently Managing Processes with the ps Command in Linux</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Thu, 23 Mar 2023 16:52:18 +0000</pubDate>
      <link>https://dev.to/k1lgor/efficiently-managing-processes-with-the-ps-command-in-linux-17p</link>
      <guid>https://dev.to/k1lgor/efficiently-managing-processes-with-the-ps-command-in-linux-17p</guid>
      <description>

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ps&lt;/code&gt; command is a powerful tool in Linux that allows you to monitor and manage processes on your system. Whether you need to identify a specific process, check the resource usage of a program, or kill a process that's misbehaving, the &lt;code&gt;ps&lt;/code&gt; command has you covered.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Using the &lt;code&gt;ps&lt;/code&gt; Command&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;At its simplest, the &lt;code&gt;ps&lt;/code&gt; command allows you to view information about the processes running on your system. For example, you can use the &lt;code&gt;ps&lt;/code&gt; command with no options to display a list of all the processes running on your system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4f39n761o1x565zf4ej.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4f39n761o1x565zf4ej.png" alt="Image 1" width="305" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above command will display a list of all the processes currently running on your system. By default, the &lt;code&gt;ps&lt;/code&gt; command will display the process ID (PID), the terminal associated with the process, the CPU usage, and the command that started the process&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Options and Customization&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;While the basic ps command is useful, there are many options and customization features that you can use to tailor the output to your specific needs. For example, you can use the -e option to display information about all processes on the system, regardless of who owns them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-e&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F50b0p9ym2tigz8k2m9om.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F50b0p9ym2tigz8k2m9om.png" alt="Image 2" width="543" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another useful option is the -f option, which displays a more detailed output that includes the UID, PPID, C, STIME, TTY, and TIME fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy9w4kdhe8hfklt9afhua.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy9w4kdhe8hfklt9afhua.png" alt="Image 3" width="653" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Tips and Tricks&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You can use the &lt;code&gt;grep&lt;/code&gt; command to search for specific processes. For example, to search for all processes containing the word "chrome", you can use the following command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-ef&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;brave

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5z7rp2mirdxwwgm459wp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5z7rp2mirdxwwgm459wp.png" alt="Image 4" width="800" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can use the &lt;code&gt;kill&lt;/code&gt; command to terminate a process. For example, to kill a process with a specific PID, you can use the following command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;kill &lt;/span&gt;PID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6eq332ps27voa6jdktk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6eq332ps27voa6jdktk.png" alt="Image 5" width="677" height="151"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you choose the PID number.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-ef&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8pdjzn7936bpq70hhgvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8pdjzn7936bpq70hhgvb.png" alt="Image 6" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and a tree-like format:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-ejH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ofueo7h62by4c00ibls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ofueo7h62by4c00ibls.png" alt="Image 7" width="732" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and a BSD-style format:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps axo pid,tt,user,fname,tmout,f,wchan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F044ja1xhx3sagjcjw413.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F044ja1xhx3sagjcjw413.png" alt="Image 8" width="493" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and display the username and start time:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-eo&lt;/span&gt; user,pid,ppid,c,start_time,cmd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk7gsgwe0mkkv1fp9qqop.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk7gsgwe0mkkv1fp9qqop.png" alt="Image 9" width="651" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and display the threads for each process:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-eLf&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmjx3yacnm8fmhbp8nk0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmjx3yacnm8fmhbp8nk0x.png" alt="Image 10" width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and display the start time and elapsed time for each process:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-eo&lt;/span&gt; pid,comm,lstart,etime
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjtmdzb9smcl3ej5e3n1v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjtmdzb9smcl3ej5e3n1v.png" alt="Image 11" width="624" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and sort by memory usage (descending):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nt"&gt;--sort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;-rss&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femrysjvy46ckjlwqcauo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femrysjvy46ckjlwqcauo.png" alt="Image 12" width="367" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and display only the processes owned by a specific user:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-u&lt;/span&gt; username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dzqed7iavm9xhx2k7qz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dzqed7iavm9xhx2k7qz.png" alt="Image 13" width="435" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and display only the processes with a specific name:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-C&lt;/span&gt; program_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fanpfhmfwxcfq388wiphj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fanpfhmfwxcfq388wiphj.png" alt="Image 14" width="326" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show all processes with full information and display only the processes with a specific PID:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-p&lt;/span&gt; PID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqrsu9aoe7zo8bsdwsaft.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqrsu9aoe7zo8bsdwsaft.png" alt="Image 15" width="324" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can use the &lt;code&gt;top&lt;/code&gt; command to view a dynamic real-time display of the processes running on your system.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The ps command is a powerful and essential tool in Linux for monitoring and managing processes. With its simple syntax and powerful options, you can quickly identify, monitor, and manage processes on your system. Whether you're a system administrator, developer, or power user, the ps command is a must-know tool for efficient Linux management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Managing Disk Space in Linux with the df Command</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Thu, 09 Mar 2023 20:11:27 +0000</pubDate>
      <link>https://dev.to/k1lgor/managing-disk-space-in-linux-with-the-df-command-3lh8</link>
      <guid>https://dev.to/k1lgor/managing-disk-space-in-linux-with-the-df-command-3lh8</guid>
      <description>

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;df&lt;/code&gt; command is a useful tool for managing disk space on your Linux system. It displays information about the file system disk space usage, including the amount of free space, used space, and the percentage of space used. Here are some examples of using &lt;code&gt;df&lt;/code&gt; command:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage in human-readable format&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs5ap8or48ghh4g4m6l8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs5ap8or48ghh4g4m6l8f.png" alt="Image 1" width="644" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage for a specific file system&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-hT&lt;/span&gt; /dev/sda1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2smwkc15uqydtn37411w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2smwkc15uqydtn37411w.png" alt="Image 2" width="697" height="85"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage for all file systems (including speudo file systems)&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-aTh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fql0e18882kgm3pjsoo3s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fql0e18882kgm3pjsoo3s.png" alt="Image 3" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage for a specific file system and exclude file systems of a certain type&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-hT&lt;/span&gt; &lt;span class="nt"&gt;-x&lt;/span&gt; tmpfs /dev/sda1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5p9wn42nqnrzs9oj44yx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5p9wn42nqnrzs9oj44yx.png" alt="Image 4" width="738" height="86"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage in bytes for all file systems (including empty file systems)&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-BT&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faclcnelaf3rkp6hc5wkf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faclcnelaf3rkp6hc5wkf.png" alt="Image 5" width="732" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage for a specific file system with inode information&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; /dev/sda1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9zjqyg5y9g02joxl9lad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9zjqyg5y9g02joxl9lad.png" alt="Image 6" width="631" height="85"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage with a specific output format&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;,fstype,size,used,avail,pcent,target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9yq3380ay5y19vi3tjm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9yq3380ay5y19vi3tjm.png" alt="Image 7" width="800" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage sorted by a specific column (ascending)&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-hT&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-k&lt;/span&gt; 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5be4y1br1ptfgmlk3sp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5be4y1br1ptfgmlk3sp.png" alt="Image 8" width="754" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage sorted by a specific column (descending)&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-hT&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-k&lt;/span&gt; 3 &lt;span class="nt"&gt;-r&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxkdfjpr128bgncr421q7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxkdfjpr128bgncr421q7.png" alt="Image 9" width="744" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Show disk space usage for all file systems and exclude the header line&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-hT&lt;/span&gt; | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; +2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmrqecndg8i0wbv32nc9w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmrqecndg8i0wbv32nc9w.png" alt="Image 10" width="751" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Tips&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use the &lt;code&gt;h&lt;/code&gt; option to display disk space usage in human-readable format (e.g., GB, MB)&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;x&lt;/code&gt; option to exclude file systems of a certain type (e.g., tmpfs,devtmpfs)&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;-output&lt;/code&gt; option to customize the output format of the command&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;sort&lt;/code&gt; and &lt;code&gt;tail&lt;/code&gt; commands to sort and filter the output as needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In summary, the &lt;code&gt;df&lt;/code&gt; command is a powerful tool for managing disk space on your Linux system. With the various options available, you can easily view and analyze disk space usage for specific file systems and customize the output format.&lt;br&gt;
Remember to use the available sorting and filtering commands to further manage and analyze the output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Mastering the awk command in Linux</title>
      <dc:creator>k1lgor</dc:creator>
      <pubDate>Fri, 03 Mar 2023 20:38:47 +0000</pubDate>
      <link>https://dev.to/k1lgor/mastering-the-awk-command-in-linux-5d34</link>
      <guid>https://dev.to/k1lgor/mastering-the-awk-command-in-linux-5d34</guid>
      <description>

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Hey there! As a Linux user, you might have heard about the powerful &lt;code&gt;AWK&lt;/code&gt; command, but you might not be fully familiar with its capabilities. &lt;code&gt;AWK&lt;/code&gt; is a text processing tool that can help you manipulate data in many ways. In this blog post, let's dive deep into the &lt;code&gt;AWK&lt;/code&gt; command, explore its features, use cases, and some tips to help you master it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;AWK Basics&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;AWK&lt;/code&gt; is a line-oriented programming language that can be used to search and manipulate text files. It operates by performing actions on each line of a file, based on the patterns specified in the command. The basic syntax of the &lt;code&gt;AWK&lt;/code&gt; command is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'pattern { action }'&lt;/span&gt; filename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pattern can be a regular expression or a string and specifies the lines to which the action should be applied. The action can be any valid &lt;code&gt;AWK&lt;/code&gt; command and is enclosed in braces {}. The filename is the name of the file to be processed.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Printing Columns&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of the most common use cases for &lt;code&gt;AWK&lt;/code&gt; is to extract columns from a file. The following command will print the first and second columns of a file separated by a comma:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{ print $1 "," $2 }'&lt;/span&gt; people.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90oy0lss82m84k3utgx9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90oy0lss82m84k3utgx9.png" alt="Image 1" width="738" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;$1&lt;/code&gt; and &lt;code&gt;$2&lt;/code&gt; represent the first and second columns, respectively. The comma is added to separate the columns.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conditional Statements&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;AWK&lt;/code&gt; also supports conditional statements, such as if-else. The following command will print lines from a file that contain the word "error":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'/error/ { print }'&lt;/span&gt; people.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6wn1e0aqz0wjbvru55y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6wn1e0aqz0wjbvru55y.png" alt="Image 2" width="713" height="64"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The pattern &lt;code&gt;/error/&lt;/code&gt; specifies the lines that contain the word "error". The action &lt;code&gt;{ print }&lt;/code&gt; prints those lines.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Calculations&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;AWK&lt;/code&gt; can be used to perform calculations on data in a file. The following command will print the sum of the values in the third column of a file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{ sum += $3 } END { print sum }'&lt;/span&gt; people.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4305yp48ge3aoox47wo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4305yp48ge3aoox47wo.png" alt="Image 3" width="800" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The sum variable is initialized to zero and then incremented by the value of the third column for each line. The &lt;code&gt;END&lt;/code&gt; keyword specifies that the final action should be performed after all lines have been processed.&lt;/p&gt;

&lt;p&gt;In addition to the basic features of &lt;code&gt;AWK&lt;/code&gt;, there are many advanced features that can be used to manipulate data in powerful ways.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Regular Expressions&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;AWK&lt;/code&gt; supports regular expressions, which can be used to search for patterns in text. The following command will print lines from a file that start with the word "error":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'/^error/ { print }'&lt;/span&gt; error.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl3agarmqzx365sigbhto.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl3agarmqzx365sigbhto.png" alt="Image 4" width="743" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;^&lt;/code&gt; symbol indicates the start of the line. The pattern &lt;code&gt;/^error/&lt;/code&gt; specifies lines that start with the word "error".&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Field Separators&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By default, &lt;code&gt;AWK&lt;/code&gt; assumes that fields in a file are separated by colon. However, it is possible to specify a different field separator using the &lt;code&gt;-F&lt;/code&gt; option. The following command will print the first column of a file that is separated by colon:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt; &lt;span class="s2"&gt;":"&lt;/span&gt; &lt;span class="s1"&gt;'{ print $1 }'&lt;/span&gt; number.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkfk3rxdfnbzpi01r7w2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkfk3rxdfnbzpi01r7w2.png" alt="Image 5" width="758" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-F&lt;/code&gt; &lt;code&gt;":"&lt;/code&gt; option sets the field separator to colon. The &lt;code&gt;$1&lt;/code&gt; represents the first column.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;User-Defined Functions&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;AWK&lt;/code&gt; allows users to define their own functions, which can be used to perform custom data processing. The following command defines a function called "double" that multiplies a number by 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'function double(x) { return x*2 } { print double($1) }'&lt;/span&gt; number.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9cmk41laf4jfh6en4pwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9cmk41laf4jfh6en4pwy.png" alt="Image 6" width="800" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;function double(x)&lt;/code&gt; takes an argument &lt;code&gt;x&lt;/code&gt; and returns &lt;code&gt;x&lt;/code&gt; multiplied by 2. The &lt;code&gt;{ print double($1) }&lt;/code&gt; action applies the double function to the first column of each line.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In this blog post, we have explored the &lt;code&gt;AWK&lt;/code&gt; command in Linux, including its basic syntax, common use cases, and advanced features. With this knowledge, you can use &lt;code&gt;AWK&lt;/code&gt; to manipulate data in a variety of ways. Don't forget to experiment with different patterns and actions to fully leverage the power of &lt;code&gt;AWK&lt;/code&gt;. Good luck!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thank you for reading&lt;/em&gt;&lt;/strong&gt; 🧑‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay tuned for more&lt;/em&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✌️ and &lt;strong&gt;&lt;em&gt;logout&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/k1lgor" rel="noopener noreferrer"&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.buymeacoffee.com%2Fbuttons%2Fv2%2Fdefault-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>software</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
