1. Welcome > 
  2. Codes > 
  3. bash > 
  4. update symlinks
  • Bash

Update symbolic links

#!/usr/bin/bash

find -type l -exec bash -c \
    'ln -f "$(readlink -m "$0")" "$0"' {} \;

Note: I don’t know why I wrote this command… At some point, I may be useful !



Related (find) topics:

  • Find files containing a specific pattern
  • Color the output of find
Apr 7, 2025
Audrey Onfroy

  • About


  • Posts
    • Welcome
  • Tools
    • Codes
      • bash
        • allow files access on cluster
        • color find output
        • define symlinks
        • find pattern in files
        • replace symlinks
        • update symlinks
      • Git
        • remove files git
        • split + submodule + history
      • R
        • two versions of R
        • clean R env
        • ggplot guides
        • i-th elements of a R list
      • html / markdown
        • table
        • html in md
    • GitHub
    • LinkedIn
    • HAL

    •  

    Built with by Hugo