I used all the following to make sure that the sylink backup process works as expected, it seems to be working as expected
# These are files
ls -l /Users/krishna/.vimrc*
ls -l /Users/krishna/github/obsidian_main/.obsidian.vimrc*
ls -l /Users/krishna/.zshrc*
ls -l /Users/krishna/.tmux.conf*
ls -l /Users/krishna/.config/alacritty/alacritty.toml*
ls -l /Users/krishna/.yabairc*
# Below ones are directories
ls -ld /Users/krishna/.config/nvim*
ls -ld /Users/krishna/.hammerspoon*
ls -ld /Users/krishna/.config/karabiner*
- To delete all the original files and directories and confirm they will be recreated
# These are files
rm /Users/krishna/.vimrc
rm /Users/krishna/github/obsidian_main/.obsidian.vimrc
rm /Users/krishna/.tmux.conf
rm /Users/krishna/.config/alacritty/alacritty.toml
rm /Users/krishna/.yabairc
# Below ones are directories
rm -r /Users/krishna/.config/nvim
rm -r /Users/krishna/.hammerspoon
rm -r /Users/krishna/.config/karabiner
This will delete all the original files and directories, in case they're symlinks, then re-create them as regular files with test data Useful to test backup funcionality
# These are files
rm /Users/krishna/.vimrc
rm /Users/krishna/github/obsidian_main/.obsidian.vimrc
rm /Users/krishna/.tmux.conf
rm /Users/krishna/.config/alacritty/alacritty.toml
rm /Users/krishna/.yabairc
# Below ones are directories
rm -r /Users/krishna/.config/nvim
rm -r /Users/krishna/.hammerspoon
rm -r /Users/krishna/.config/karabiner
echo "# Test file auto created" > /Users/krishna/.vimrc
echo "# Test file auto created" > /Users/krishna/github/obsidian_main/.obsidian.vimrc
echo "# Test file auto created" > /Users/krishna/.tmux.conf
echo "# Test file auto created" > /Users/krishna/.config/alacritty/alacritty.toml
echo "# Test file auto created" > /Users/krishna/.yabairc
mkdir -p /Users/krishna/.config/nvim
echo "echo 'Test content'" > /Users/krishna/.config/nvim/testfile.sh
mkdir -p /Users/krishna/.hammerspoon
echo "echo 'Test content'" > /Users/krishna/.hammerspoon/testfile.sh
mkdir -p /Users/krishna/.config/karabiner
echo "echo 'Test content'" > /Users/krishna/.config/karabiner/testfile.sh
# These are files
ls -l /Users/krishna/.vimrc*
ls -l /Users/krishna/github/obsidian_main/.obsidian.vimrc*
ls -l /Users/krishna/.zshrc*
ls -l /Users/krishna/.tmux.conf*
ls -l /Users/krishna/.config/alacritty/alacritty.toml*
ls -l /Users/krishna/.yabairc*
# Below ones are directories
ls -ld /Users/krishna/.config/nvim*
ls -ld /Users/krishna/.hammerspoon*
ls -ld /Users/krishna/.config/karabiner*
# These are files
rm /Users/krishna/.vimrc_backup_*
rm /Users/krishna/github/obsidian_main/.obsidian.vimrc_backup_*
rm /Users/krishna/.zshrc.backup
rm /Users/krishna/.tmux.conf_backup_*
rm /Users/krishna/.config/alacritty/alacritty.toml_backup_*
rm /Users/krishna/.yabairc_backup_*
# Below ones are directories
rm -r /Users/krishna/.config/nvim_backup_*
rm -r /Users/krishna/.hammerspoon_backup_*
rm -r /Users/krishna/.config/karabiner_backup_*