Last active
December 1, 2019 10:44
-
-
Save ilkarman/8db47e1d43ce736824d9e318d1b27e02 to your computer and use it in GitHub Desktop.
Useful Linux Commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kill all processes in nvidia-smi | |
kill -9 $(nvidia-smi | sed -n 's/|\s*[0-9]*\s*\([0-9]*\)\s*.*/\1/p' | sort | uniq | sed '/^$/d' | |
# Resize param for ffmpeg: 171 width, 128 height & pad (without stretching) | |
-vf "scale=iw*min(171/iw\,128/ih):ih*min(171/iw\,128/ih),pad=171:128:(171-iw)/2:(128-ih)/2" | |
# Stop/remove all docker containers | |
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
# Count all files in (sub)folder(s) | |
find . -type f | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment