How to batch update all symlink pointers to replace "_F-ss" with empty string?

65 views Asked by At

I am trying to replace all text file symlink pointers to replace _F-ss with empty string as below but running into below error, any guidance on how to fix this?

find . -name "*.txt" -type l | xargs 'ln -nsf "$(readlink "%p" | sed s/_F-ss//)"'

Error:-

xargs: ln -nsf "$(readlink "%p" | sed s/_F-ss//)": No such file or directory
0

There are 0 answers