| command | description |
|---|---|
| nl FILE_NAME | Display contents of a file with line numbers |
| cat FILE_NAME | Displays entire file content |
| less FILE_NAME | Open file contents in scroll mode (one page at a time) |
| head FILE_NAME | Displays the first few lines of a file |
| tail FILE_NAME | Displays the last few lines of a file |
| more FILE_NAME | Open file contents in scroll mode using the Enter key (it will show you the position in %) |
| cat >FILE_NAME | Create a new file that can be edited directly in the terminal |
| touch FILE_NAME | Create a new file |
| vi FILE_NAME | If the file exists, open it directly open in a vi text editor, or create it and open it in a vi text editor (inside terminal) |
| vim FILE_NAME | If the file exists, open it directly open in a vim text editor, or create it and open it in a vim text editor (inside terminal) |
| nano FILE_NAME | Whether the file exists or not, open it in a nano text editor (inside terminal) |
| gedit FILE_NAME | Whether the file exists or not, open it in a gedit text editor (outside terminal) |
| mv OLD_FILE_NAME NEW_FILE_NAME | Change file name |
| printf "MY_TEXT"> FILE_NAME | Create a new file with your text between the quotes |
| open PATH/TO/YOUR_FILE_NAME | open YOUR_FILE_NAME in default text editor |
| command | description |
|---|---|
| open ( . | PATH/TO_YOUR_DIRECTORY ) | open current folder directory in file explorer |
| command | description |
|---|---|
| kill -9 PID | Kill the process |