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:15] – jonas | linux-survival [2026/05/13 12:52] (current) – jonas | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Why Linux? ===== | ===== Why Linux? ===== | ||
| - | Linux is the //de facto// operating system for scientific computing thanks to its high performance and extensive customisability. Most of the software used for processing and analysing neuroimaging data runs under the Linux operating system (OS). There are good reasons for this - Linux is fast and powerful (all of the 500 fastest supercomputers in the world run Linux and most CGI effects in films are made on Linux computers), widely used (major online providers like Amazon and Google run Linux and 96% of the top 1 million most visited websites are run by Linux, as are 85% of smartphones - Android being a derivative of Linux) and highly customisable - for example, NASA uses it to fly helicopters on Mars! | + | Linux is the //de facto// operating system for scientific computing thanks to its high performance and extensive customisability, and most of the software used for processing and analysing neuroimaging data runs under Linux. There are good reasons for this - Linux is fast and powerful (all of the 500 fastest supercomputers in the world run Linux and most CGI effects in films are made on Linux computers), widely used (major online providers like Amazon and Google run Linux and 96% of the top 1 million most visited websites are run by Linux, as are 85% of smartphones - Android being a derivative of Linux) and highly customisable - for example, NASA uses it to fly helicopters on Mars! |
| Equally importantly, | Equally importantly, | ||
| 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 40: | Line 43: | ||
| - | ==== The Linux terminal ==== | + | ===== The Linux terminal |
| Although modern Linux versions have a look and feel that is similar to Windows or Mac, a lot of the power of Linux resides in the use of the // | Although modern Linux versions have a look and feel that is similar to Windows or Mac, a lot of the power of Linux resides in the use of the // | ||
| 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.1759918505.txt.gz · Last modified: 2025/10/08 10:15 by jonas