<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-use-piping-and-redirection-in-the-linux-terminal-tz4dupvcn" -->

---
title: How to Use Piping and Redirection in the Linux Terminal
description: Learn the basics of piping and redirection in Linux. Discover how to redirect the output and input of commands, count files and directories, and sort lists of...
canonical: https://daily.dev/posts/how-to-use-piping-and-redirection-in-the-linux-terminal-tz4dupvcn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Use Piping and Redirection in the Linux Terminal | daily.dev
og:description: Learn the basics of piping and redirection in Linux. Discover how to redirect the output and input of commands, count files and directories, and sort lists of...
og:url: https://daily.dev/posts/how-to-use-piping-and-redirection-in-the-linux-terminal-tz4dupvcn
og:image: https://api.daily.dev/og/posts/tZ4duPvCN.png
og:image:alt: How to Use Piping and Redirection in the Linux Terminal
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Use Piping and Redirection in the Linux Terminal

**[freeCodeCamp](https://daily.dev/sources/freecodecamp)** · 7 min read · 25 upvotes · 2 comments

## Summary

Learn the basics of piping and redirection in Linux. Discover how to redirect the output and input of commands, count files and directories, and sort lists of files and directories. Combine piping and redirection for powerful commands.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.freecodecamp.org/news/linux-terminal-piping-and-redirection-guide/>

## Community discussion

Top comments from developers on daily.dev.

**@1dvlpr** · 0 upvotes

> great

**@junigodev** · 0 upvotes

> THANKS, AND WOW!!!

---

Tags: [#linux](https://daily.dev/tags/linux)

[View this post on daily.dev](https://daily.dev/posts/how-to-use-piping-and-redirection-in-the-linux-terminal-tz4dupvcn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Use Piping and Redirection in the Linux Terminal","url":"https://daily.dev/posts/how-to-use-piping-and-redirection-in-the-linux-terminal-tz4dupvcn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-use-piping-and-redirection-in-the-linux-terminal-tz4dupvcn"},"datePublished":"2024-04-27T07:17:41.213Z","dateModified":"2024-08-30T02:28:11.039Z","description":"Learn the basics of piping and redirection in Linux. Discover how to redirect the output and input of commands, count files and directories, and sort lists of...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6b30ff2305881f42b892537df11c80bc?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6b30ff2305881f42b892537df11c80bc?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"freeCodeCamp","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"freeCodeCamp","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1628412854/logos/freecodecamp","url":"https://daily.dev/sources/freecodecamp"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/how-to-use-piping-and-redirection-in-the-linux-terminal-tz4dupvcn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":25},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"linux","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"freeCodeCamp","item":"https://daily.dev/sources/freecodecamp"},{"@type":"ListItem","position":3,"name":"How to Use Piping and Redirection in the Linux Terminal"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-to-use-piping-and-redirection-in-the-linux-terminal-tz4dupvcn","comment":[{"@type":"Comment","text":"great","datePublished":"2024-04-29T01:45:18.719Z","url":"https://daily.dev/posts/tZ4duPvCN#c-guaylem4K","author":{"@type":"Person","name":"Aditya Tomar","url":"https://daily.dev/1dvlpr","image":"https://avatars.githubusercontent.com/u/132193415?v=4"}},{"@type":"Comment","text":"THANKS, AND WOW!!!","datePublished":"2024-04-29T05:04:47.373Z","url":"https://daily.dev/posts/tZ4duPvCN#c-e11bNKEyE","author":{"@type":"Person","name":"Junior Guerra","url":"https://daily.dev/junigodev","image":"https://avatars.githubusercontent.com/u/76542376?v=4"}}]}
```

