sudo ./script
./script
sudo apt purge telegram-desktop*
sudo rm -Rf /opt/Telegram ~/Загрузки/Telegram\ Desktop ~/.local/share/TelegramDesktop; sudo rm /usr/local/bin/telegram-desktop; rm -f .config/autostart/telegramdesktop.desktop .local/share/applications/telegramdesktop.desktop .local/share/icons/telegram.png
cd /tmp; wget https://telegram.org/dl/desktop/linux -O linux.tar.xz; sudo tar -xpf linux.tar.xz -C /opt; cd; sudo ln -s /opt/Telegram/Telegram /usr/local/bin/telegram-desktop; sudo chmod -R $USER:$USER /opt/Telegram; telegram-desktop & exit
/root/.bashrc
не проблема, но только будет работать только при входе в root:sudo su -
или
sudo -i
mkcp() {
test -d "${@: -1}" || sudo mkdir -p "${@: -1}"
sudo cp "$@"
}
sudo -i mkcp -r ~/Local/Test/* /opt/2021/04/