Redirections, Pipes & Permissions in Linux

By EssingtonITS team ·

Guide to use redirections, Pipes and a summary of file permissions in Linux. Useful to manage a Linux installation.

Redirections

Commands can redirect their output to specified locations instead of displaying them on the screen. For example, to write the list of a directory to a file, you could run the following command:

ls -al > filelist.txt

The above command will create the file if it does not exist and overwrite the existing file if it does. To append text, you can use double output signs '>>'.

ls -al >> filelist.txt

Below is an example of command input redirection. The file.txt file will input into the wc command, which counts the lines and words in the file. The result of this will then be written to the file count.txt.

wc < file.txt > count.txt

Pipes

Pipes allow you to put the output of one programme into the input of another. For example, we could pipe the output of a large list to the 'more' programme, allowing us to page through the directory listings.

ls -al /etc | more

File Permissions

Each file has the following security groups:

  • Owner
  • Group
  • Others

Each of these groups has three flags that control the access status:

  • Read
  • Write
  • Execute

The example below would allow the owner of the file to read, write, and execute, whilst the group can only read and write, and all other users can only read the file.

User Group Other (world)
R W X R W - R - -

When changing the permissions or ownership of a file, these flags can be represented in a three-digit octal number, e.g. 760. To understand this, look at the table below.

User Group Other (world)
R W X R W X R W X
4 2 1 4 2 1 4 2 1

Example file permissions:

-rwx rw- --- 1 root root 56 Mar 27 11:31 ed.txt

R W X R W - - - -
7 6 0

Looking to enhance your Linux infrastructure? At EssingtonITS.co.uk, we offer expert support and tailored solutions to optimise your systems. Let us help you achieve seamless integration and improved performance.

person people found this useful.

Related

Knowledge base 10 Jun 2026

Personal Notebook in eLLM

The personal notebook in eLLM allows users to organise and store notes, images, and files in a private, searchable timeline. It ensures privacy by keeping contents visible only to the user, and it can be integrated with the assistant for personalised answers.

Knowledge base 9 Jun 2026

Git Commands Quick Reference Guide

This quick reference guide covers essential Git commands for repository setup, staging, branching, merging, and working with remote repositories, making it a handy tool for developers to streamline their workflow.

Knowledge base 9 Jun 2026

Organisation Skills in the eLLM Admin Console

The article explains how the eLLM Admin Console allows organisations to create and manage shared instruction sets called "organisation skills" to ensure consistent responses across teams. These skills can be customised, restricted to specific groups, and integrated with extern…

Expand 29 Jul 2026

How AI can support pupils with SEND

Explore how AI tools are aiding pupils with special educational needs and disabilities by simplifying text, breaking down tasks, and enhancing accessibility. Learn about the considerations schools should make before implementation.

Expand 29 Jul 2026

AI policy and practice in further education

Further education colleges need distinct AI policies due to their unique mix of vocational courses, diverse age groups, and specific funding and inspection requirements. This guidance highlights the importance of tailored AI approaches in FE settings.