This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#$1 search-word | |
#$2 replace-word | |
for i in $(ack "$1" . -l); do | |
sed -i "s/$1/$2/g" $i | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#$1 = CephFS directory | |
# Snapshots starting with underscore names are related to snapshots based in a higher directory and can't be used. | |
# Therefore they are filterd out with `grep` | |
find $1 -type d | while read i; do | |
ls --color=none $i/.snap | while read j; do | |
echo $i/.snap/$j | |
done |