srdusr
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2022-12-26 18:38:31 +0200
committersrdusr <[email protected]>2022-12-26 18:38:31 +0200
commitf3466c604f09164239fefade9ab077c17961a771 (patch)
tree7c030855c39dcb09d57b755e079df5daa42035c4
parent1195de364aaade112b12bf0501ae855dfdb09981 (diff)
downloadnotes-f3466c604f09164239fefade9ab077c17961a771.tar.gz
notes-f3466c604f09164239fefade9ab077c17961a771.zip
Add shorter syntax for copying/moving to/from current directory
-rw-r--r--linux/linux-commands.md41
1 files changed, 26 insertions, 15 deletions
diff --git a/linux/linux-commands.md b/linux/linux-commands.md
index 35b329b..2ca217d 100644
--- a/linux/linux-commands.md
+++ b/linux/linux-commands.md
@@ -1,16 +1,27 @@
-## Job Control
-* List jobs, job_id is the numerical value of the job
-$ jobs
-* suspend job into background, similar to pause so that one can can do something else
-<Ctrl-Z>
-* Can resume it's running in the background by:
-$ bg <job_id>
-* Bring it back to foreground by inserting:
-$ fg
-* Or this incase of multiple jobs:
-$ fg %<job_id>
-* To suspend the process running in the background, use:
-$ kill -STOP %job_id
+#### Job Control
+* List jobs, job_id is the numerical value of the job
+ `$ jobs`
+* suspend job into background, similar to pause so that one can can do something else
+`<Ctrl-Z>`
+* Can resume it's running in the background by:
+ `$ bg <job_id>`
+* Bring it back to foreground by inserting:
+ `$ fg`
+* Or in case of multiple jobs:
+ `$ fg %<job_id>`
+* To suspend the process running in the background, use:
+ `$ kill -STOP %job_id`
+- - -
-## Copy text/output into a file (useful if in putty/non graphical terminal emulator)
-$ <command> 2>&1 | tee output-file
+#### Copying/Moving/Renaming Files/Directories
+- Shorter syntax to copy/move from/to current file path (current working directory) `$(pwd)`
+NOTE: `.` can also be used but is limited
+ `$ cp -r $(pwd)/path-to/file ~/new/path/`
+ `$ mv -r ~/another/directory/file .`
+
+- - -
+
+#### Copying/Pasting Text
+- Copy text/output into a file (useful if in putty/non graphical terminal emulator)
+ `$ <command> 2>&1 | tee output-file`
+- - -