User Tools

Site Tools


linux-survival

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux-survival [2026/05/13 12:39] – [Useful commands & programs] jonaslinux-survival [2026/05/13 12:52] (current) jonas
Line 117: Line 117:
 ls ~ ls ~
 </code> </code>
 +
 +%%|%% Pipe symbol
 +
 +A //pipe// in Linux is a connection between two programs or commands - it basically acts as a "pipe" that sends the output of one command to be the input of another. It works primarily for text files but can be very useful. For example, you might want to look at all the strings in a binary data file like a DICOM to find a participants date of birth. You can use the command //strings// to extract the text information from the file, but as it's a lot you want to be able to look at it one page at a time. For this you would use the command //more//. more takes a text file as input, but can also use the output of another file as a pipe. To do this you type the first command followed by the vertical pipe symbol | and then the second command. So to look at the text content of a file called mydicom.IMA, you could type
 +
 +<code>
 +# print out the strings (text data) in the file mydicom.IMA and display it one page at a time using more
 +strings mydicom.IMA | more
 +</code>
 +
 +
  
  
linux-survival.1778675993.txt.gz · Last modified: 2026/05/13 12:39 by jonas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki