mahiki / desertislandutils

convenience shell utility scripts written in python
1 stars 0 forks source link

toobigdatadoc: absolute paths only #1

Closed mahiki closed 2 years ago

mahiki commented 2 years ago

Change functionality to absolute paths instead of relative

Its much more rare to migrate machines than move folders around.

A better way is absolute path:

  1. not portable to other machine, but a simple script can fix it:
for symlink in */**/*; do
   # '/Users/HomeFolder1/*' -> '/home/HomeFolder2/'
   unlink $symlink
   ln -s $symlink_new $symlink_location
done

TODO

TODO: change script functionality TODO: convert existing relative symlinks DONE: test if ~ can be used in symlink, this would solve migration problem

reminder about purpose of the toobigdatadoc script

I still want to keep my journal folder separate from arbitrary binary docs! Its just nicer.

The parallel file system is to separate binary files from text files

mahiki commented 2 years ago

Cannot use ~ in a symlink

Symlinks are strings, and no character expansion when evaluated.

ln -s '~/toodoc/desertislandutils/tests/toobigdatadoc' tilde-doc
l tilde-doc/
# ls: cannot access 'tilde-doc/': No such file or directory