Daily Shaarli
January 23, 2023
find /path/to/base/dir -type d -print0 | xargs -0 chmod 755
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644
find . -maxdepth 2 -name '*.py' -type f | xargs -0 chmod +x
=== REPLACE ALL INSTANCES ON OSX ===
LC_ALL=C find ./ -type f -name "*.py" -exec sed -i '.bak' -e 's/trade_fee_percent/curve_fee_mult/g' {} \;
== MULTIPLE FILETYPES
find ./ -type f ( -iname *.jpg -o -iname *.png )
make group hack and share folder with it
sudo groupadd hack
sudo chgrp -R hack /data/trueblocks
sudo chmod 770 /data/trueblocks
sudo chmod +s /data/trueblocks
create new user and add it to group hack
sudo useradd jacob --home-dir /home/jacob --shell /bin/zsh --no-create-home
sudo cp -r /home/alex/ /home/alex/
sudo chown -vR jacob:jacob /home/jacob
sudo usermod -aG hack alex
shared permissions
sudo chown root:hack /code
sudo chmod 2750 /code (2770 for executable)
sudo chmod go-rwx /code/*
sudo chmod g+rX /code/zsh-autosuggestions /code/zsh-syntax-highlighting
sudo chown -R :hack /code/zsh-autosuggestions /code/zsh-syntax-highlighting
sudo chmod -R g+s /code/zsh-autosuggestions /code/zsh-syntax-highlighting
sudo setfacl -R -m g:hack:rwx /code/zsh-autosuggestions /code/zsh-syntax-highlighting
sudo setfacl -R -d -m g:hack:rwx /code/zsh-autosuggestions /code/zsh-syntax-highlighting