From 419d4862b5fb557584bf4ea991bb4dd7910e6e3e Mon Sep 17 00:00:00 2001 From: deinonychus Date: Mon, 22 Jul 2024 13:58:49 +0200 Subject: [PATCH 1/3] added "cd -" --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index bd57e1c..b1babb4 100644 --- a/README.md +++ b/README.md @@ -3180,6 +3180,15 @@ cd $(mktemp -d) # for example, this will create a temporary directory "/tmp/tmp.TivmPLUXFT" ``` +##### Quickly return to last working directory +```bash +cd - +# example that will get you back to home directory: +# cd ~ +# cd /tmp/tmp.TivmPLUXFT +# cd - +``` + ##### Make all directories at one time! ```bash mkdir -p project/{lib/ext,bin,src,doc/{html,info,pdf},demo/stat} From de6733d5a9f0cf2d6120bc59b97353c2b810964c Mon Sep 17 00:00:00 2001 From: deinonychus Date: Mon, 22 Jul 2024 14:57:07 +0200 Subject: [PATCH 2/3] Delete _config.yml Signed-off-by: deinonychus --- _config.yml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 _config.yml diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 4a93fb0..0000000 --- a/_config.yml +++ /dev/null @@ -1,2 +0,0 @@ -theme: jekyll-theme-cayman -google_analytics: UA-88670245-2 From 8bf41a11355741d6d93be2a752ad396ce1aa69a6 Mon Sep 17 00:00:00 2001 From: deinonychus Date: Tue, 23 Jul 2024 10:06:02 +0200 Subject: [PATCH 3/3] find / -name [FILE] 2>&1 | grep -v 'Permission denied' Signed-off-by: deinonychus --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b1babb4..e2617ac 100644 --- a/README.md +++ b/README.md @@ -1034,6 +1034,16 @@ find . -type f -empty -delete find . -type f | wc -l ``` +##### List all files with name [FILE] under / +```bash +find / -name [FILE] 2>&1 | grep -v 'Permission denied' + +# 2>&1 redirects STDERR outputs to STDOUT which is piped +# to the grep inverse filter (-v) filter command. +# Thus, any errors are surpressed, mainly due to access attempts +# on priviliged directories. +``` + ## Condition and loop [[back to top](#handy-bash-one-liners)]