From 59b72a62a65cf30b628394c354b524e854968d68 Mon Sep 17 00:00:00 2001 From: gmarx Date: Sun, 30 Jan 2022 19:21:43 -0600 Subject: [PATCH] Basic File Systems --- Readme.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..e719650 --- /dev/null +++ b/Readme.md @@ -0,0 +1,67 @@ +# Basics of GNU/Linux + +## Basic File System Commands + +| Name | Command | options | example | +|-——————+———+—————————————+-———————————| +| List files | ls | -a shows all | ls -la | +| | | -l long format | | +| | | -R recursive | | +|-——————+———+—————————————+-———————————| +| Current directory | pwd | -P prints the physical location | pwd | +|-——————+———+—————————————+-———————————| +| Change | cd | .. takes you up a level | cd /home/gmarx | +| directory | | ~ takes you to home directory | cd ~ | +|-——————+———+—————————————+-———————————| +| Make | mkdir | -p make parent directories as needed | mkdir -p test/example | +| directory | | -v print a message for each directory | mkdir -p /test/example | +| | | | *first example creates | +| | | | folders inside the | +| | | | current folder, other one | +| | | | creates folder in root directory | +|-——————+———+—————————————+-———————————| +| Delete a | rm | -r recursive (use for directories) | rm sample.txt | +| file or directory | | -d remove empty directory | rm -r test | +|-——————+———+—————————————+-———————————| +| Copy a file | cp | -r recursivec copy | cp a.txt b.txt | +| or directory | | -u copy only if the source is newer | cp test-a test-b | +| | | -v verbose (show output) | | +|-——————+———+—————————————+-———————————| +| Move a file or | mv | -i prompts before overwrite | mv a.txt c.txt | +| directory | | No -r; Moving into the same directory | mv test example | +| | | performs a renaming | | +|-——————+———+—————————————+-———————————| +| | touch | | | +|-——————+———+—————————————+-———————————| +| | more | | | +|-——————+———+—————————————+-———————————| +| | cal | | | +|-——————+———+—————————————+-———————————| +| | | | | + +*** Terminal +| Command | Description | +|———+————————| +| CTRL-c | Stop current command | +| CTRL-z | Sleep program | +| CTRL-a | Go to start of line | +| CTRL-e | Go to end of line | +| CTRL-u | Cut from start of line | +| CTRL-k | Cut to end of line | +| CTRL-r | Search history | +| !! | Repeat last command | +| Tab key | Autocompletes | +| | | +|———+————————| + +*** Package management +| Command | Debian | +|————————————+-———————| +| Install a package | sudo apt install vim | +| Upgrade the package in your system | sudo apt upgrade | +| | | +|————————————+-———————| +| | | + +*** Basic file editing with VIM +*** Expanding the file system \ No newline at end of file