×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules Donate
0

Link all the things.

submitted by registereduser to Linux 4 monthsDec 22, 2024 18:58:28 ago (+0/-0)     (Linux)

Got a bunch of ~/media/music/bunchashit/bunchafolders or ~/bin/bunch/different/script/folders ?

eg.. want to symlink every script under ~/bin/ into ~/bin/all


'
#!/bin/bash

search subdirs by ext. and create symlinks.
echo ""
echo "========================================"
echo "Run from dir above target dir. Important!!"
echo "Target dir is where sym links will be created"
echo "
========================================"
echo ""

read -erp "Enter target dir: " dir


for i in $(find . -name "sh" -o -name ".py" -o -name "*.pl" | grep -v sandbox); do ln -s $PWD/$i $dir/$(basename $i); done
'


Why does formatting on this site look like some nigger put the site up?


4 comments block

Nonstop since 1978, except during those occasional short dry spells in jail.