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 –

add oracle observer initscript

#!/bin/bash # chkconfig: 2345 20 80 # description: Oracle observer # Source function library. . /etc/init.d/functions start() { # code to start app comes here # example: daemon program_name & su - oracle -c /u01/app/oracle/admin/dg_observer_starts.sh } stop() { # code to stop app comes here # example: killproc program_name su - oracle -c /u01/app/oracle/admin/dg_observer_stops.sh } case "$1" in start) su - oracle -c /u01/app/oracle/admin/dg_observer_starts.sh ;; stop) su - oracle -c /u01/app/oracle/admin/dg_observer_stops.sh ;; restart) su - oracle -c /u01/app/oracle/admin/dg_observer_stops.sh su - oracle -c /u01/app/oracle/admin/dg_observer_starts.sh ;; status) # code to check status of app comes here # example: status program_name ;; *) echo "Usage: $0 {start|stop|status|restart}" esac exit 0

# chkconfig --add oracle_observer # chkconfig --level 2345 oracle_observer on # systemctl enable oracle_observer # systemctl start oracle_observer # systemctl status oracle_observer

create vgs,lvs,fs for single disk vg-to fs input

This is for when you have a 1to1 relation from disk to filesystem.

/u01 sdc
/u02 sdd
/u03 sde
/u04 sdf
/u05 sdg
/u06 sdh
/u07 sdi

cat x | sed 's/\///g' | awk '{ print "vgcreate "$1"_vg /dev/"$2 }'
cat x | sed 's/\///g' | awk '{ print "lvcreate -l 100%FREE -n "$1"_lv "$1"_vg" }'
cat x | sed 's/\///g' | awk '{ print "mkfs.xfs /dev/"$1"_vg/"$1"_lv" }'
cat x | sed 's/\///g' | awk '{ print "/dev/"$1"_vg/"$1"_lv /"$1" xfs defaults 0 0" }'
cat x | sed 's/\///g' | awk '{ print "mkdir /"$1 }'