-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to unlink #116
Comments
Yes, that would be useful I suppose. It is covered a little by the long-standing #28. We will not be able to do this with directories of course, since homeshick does not symlink them. Multiple castles may link files into the same folder. |
By looking at homesick, it just looks like they iterate through the specified castle's directory (where the actual files are stored; It never removes subdirectories (I don't believe they link directories either) so that wouldn't be an issue. |
👍 I'm still a noob at bash, so I was wondering how to securely unlink files currently? For example, I have Would that be the most correct method? |
Definitely don't delete the
Note that the symlinks to the files in the |
Oh thanks! That worked perfectly. Yeah I really need start learning to differentiate between |
Just ran into this problem. Accidentally installed my homeshick castles on a shared account. Now I need to go through each file one at a time to undo the links. |
This worked… mostly: homeshick -v link \
| sed 's/ */ /g;/ignored/d' \
| cut -d' ' -f 3 \
# tail -r or tac or sed '1!G;h;$d' depending on your system.
| tail -r \
| while read file; do
if [ -d $file ]; then
# non empty directories (ones with temp files) are not deleted and
# display an error for clean up after.
rmdir $file
else
rm $file
fi
done |
Homesick offers the ability to remove symlinks:
You can remove symlinks anytime when you don't need them anymore
homesick unlink CASTLE
Would anybody be interested in having the same functionality in this repo?
The text was updated successfully, but these errors were encountered: