This question already has an answer here:
I have two directories:
links/ points individually to something in
origins/, but not everything in
origins/ is linked in
links/. (Squares, rectangles & categorical hierarchy, get it?) These are symlinks (
ln -s), not hard links.
Everything in 1.
links/ needs to be deleted, along with 2. the symlink destinations in
origins/ (not knowing whether they are in
origins/), and 3. the
links/ directory itself.
rm Unix command should I type to remove both the entire
links/ directory AND any symlinked destinations symlinked to in
I'm looking for something maybe like:
rm -R /all/links or
rm -r --follow-all-ln /all/links.
rm command with parameters will not do the job, please say so explicitly as that is my preference and implicit in the title (can Unix & Linux do this via
rm without a
do loop?—only if that won't work, then please state so and explain what