copy permissions and owners from another unix

this script will generate 2 scripts “chown_cmds.bash” and “chmod_cmds.bash” from a find -ls output, those 2 scripts can be used to set permissions and ownership to files copied to another server

!/bin/sh

>/root/chown_cmds.bash
>/root/chmod_cmds.bash
echo "set -x " >> /root/chown_cmds.bash
echo "set -x" >> /root/chmod_cmds.bash

find /interfacestst -ls | grep -i '/' > /tmp/lsf

cat /tmp/lsf | awk '{ print "chown "$5":"$6" \""$NF "\"" }' > /root/chown_cmds.bash

(
cat /tmp/lsf | while read l;do
perms=echo $l | awk '{ print $3 }'
f=echo $l | awk '{ print $NF }'
OWNER=$(echo $perms | sed -e "s/.(…)./\1/" | sed -e "s/[-]//g" ) GROUP=$(echo $perms | sed -e "s/….(…)./\1/" | sed -e "s/[-]//g" )
OTHER=$(echo $perms | sed -e "s/…….(…).*/\1/" | sed -e "s/[-]//g" )
echo "chmod u=${OWNER},g=${GROUP},o=${OTHER} ${f}"
done
) |tee /root/chmod_cmds.bash

my best sox mcompand shot

for a crispy treble this is a good one, it may overdrive a bit but it’s sweet enough, sounds crispy enough, ready to satisfy your asmr crave

bass +3 200 300k mcompand “.025,.025 -40,-35,-30,-25” 100 “1,1 -40,-30,-35,-28” 7900 “1,1 -40,-30,-25,-15”

sox –effects-file /var/www/html/music/soxopts.txt “/media/HDS$SONG” -t mp3 -r 44100 -c 2 –