Shell xargs to automate routine actions
find . -type f -name "*.php.orig" -print | xargs rm $1
find . -type f -name "*.php.orig" -print | xargs rm $1
# docker inspect -f "{{ .Mounts }}" aghayevcom [{bind /home/user/Projects /home true rprivate} {bind /home/user/Servers /opt true rprivate}]
Copying files using rsync with progress bar apt-get install rsync; rsync -ah –progress /path/to/source /path/to/destination Run sql script to restore db with progress bar apt-get install pv; pv script.sql | mysql -h hostname -u username -p password database
Step 1. As a result of running the command it takes you inside newly created session screen -S sessionname Step 2. Run your command and then press the combination below to exit the screen Ctrl+A then D (after releasing Ctrl + A) Step 3 screen -ls Output: There is a screen on: 3132.sessionname (01/27/2020 05:50:32 […]
du -sh /var du -sh mysql/* du -sh .
Mounting mkdir ~/remoteDir ssh-keygen -t rsa ssh-copy-id -i .ssh/id_rsa.pub user@hostname sudo apt install sshfs sshfs user@hostname:/ ~/remoteDir Unmounting fusermount -u ~/remoteDir
vi /etc/apt/sources.list
ffmpeg -i wombsounds.mp4 -f mp3 -ab 192000 -vn wombsounds.mp3
Applications -> System Settings -> Brightness & Lock -> Lock On/Off
System Settings -> Typing -> Switch to Next Source System Settings -> Typing -> Switch to Previous Source