Symlink Exclude
von linuxCowboy- SNIPPET_TEXT:
-
- #!/bin/bash
- target=/home/csgo/game/output
- cs=/home/csgo/game/csgo-deagle1
- IFS=$'\n'
- {
- for f in `find $cs -type f`; do
- if [[
- $f == *.conf ||
- $f == *.cfg ||
- $f == *txt ||
- $f == *.ini ||
- $f == *.smx ||
- $f == *.mp3 ||
- $f == *.sh
- ]]; then
- echo -n "copy: "; cp -v "$f" $target
- else
- echo -n "link: "; ln -sfv "$f" $target
- fi
- done
- } | sort
Quellcode
Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN