linux-survival
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux-survival [2025/10/08 10:17] – [The Linux terminal] jonas | linux-survival [2026/05/13 12:52] (current) – jonas | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| UNDER CONSTRUCTION | UNDER CONSTRUCTION | ||
| - | < | + | ***// |
| - | SSH stands for Secure Shell. It is a command-line protocol which provides strong password authentication and public key authentication, | + | SSH stands for Secure Shell. It is a command-line protocol which provides strong password authentication and public key authentication, |
| + | |||
| + | < | ||
| + | To be able to connect to the server // | ||
| Line 114: | Line 117: | ||
| ls ~ | ls ~ | ||
| </ | </ | ||
| + | |||
| + | %%|%% Pipe symbol | ||
| + | |||
| + | A //pipe// in Linux is a connection between two programs or commands - it basically acts as a " | ||
| + | |||
| + | < | ||
| + | # 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 | ||
| + | </ | ||
| + | |||
| + | |||
| Line 286: | Line 300: | ||
| Syntax: cp <input file> <output file name or directory> | Syntax: cp <input file> <output file name or directory> | ||
| <code sh> | <code sh> | ||
| + | cp myfile1 myfile1copy | ||
| </ | </ | ||
| == rm - remove files == | == rm - remove files == | ||
| Line 329: | Line 344: | ||
| == find - find files == | == find - find files == | ||
| - | Syntax: | + | Syntax: |
| <code sh> | <code sh> | ||
| + | # find files containing the string yfi in your home directory and folders within it | ||
| + | # Note that the string *yfi* has to be in double quotes - this is because we want the command | ||
| + | # find to look for anything matching that pattern; without it, the shell (where you run your command from) | ||
| + | # tries to expand the pattern (i.e., look for files in your current folder that match that pattern) and | ||
| + | # send the result of that " | ||
| + | # that you want to match in double quotes. | ||
| + | find ~/ " | ||
| </ | </ | ||
| - | == grep - find text in a file == | ||
| - | Syntax: | + | == strings - extract text from a binary file == |
| - | <code sh> | + | |
| + | Syntax: | ||
| + | < | ||
| + | # Print out all strings in a DICOM file called mydicom.IMA | ||
| + | strings mydicom.IMA | ||
| + | |||
| + | == grep - find strings matching pattern in a text file == | ||
| + | |||
| + | Syntax: grep <text pattern> < | ||
| + | <code sh> | ||
| + | # Find the string jonas in the file passwords.txt | ||
| + | grep jonas passwords.txt | ||
| </ | </ | ||
| == sort - sort text == | == sort - sort text == | ||
linux-survival.1759918627.txt.gz · Last modified: 2025/10/08 10:17 by jonas