From 7fd0c548febe49c952e3b26b4464388b83345dd3 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Fri, 21 Jan 2022 18:44:44 -0500 Subject: [PATCH] Add the bl command bl stands for back-link. Move a file to another place and add a link back to the original position. This is useful to move files or directories across filesystems to free up space --- zshrc.org | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zshrc.org b/zshrc.org index e84d902..c5f3440 100644 --- a/zshrc.org +++ b/zshrc.org @@ -206,6 +206,18 @@ setup-pi-webcam() #+begin_src sh autoload ifttt #+end_src + - This is an helper for moving a file to some other place and adding + a link back to the original position. ~bl~ stands for backlink + +BIG FAT WARNING: this needs to specify an actual file as a destination + (similar to ln) adding a directory would not work. +#+begin_src sh + lb() + { + mv $1 $2 + ln -s $2 $1 + } +#+end_src *** konsole helpers :daily: #+begin_src sh function set-terminal-title() {