Usefull (fi)sh commands
This are some usefull shell commands using the fish syntax.
Delete all subfolders with name M_out
# First check the results by lsing the found dirs
find . -name M_out -exec ls '{}' \;
# Then deleting it
find . -name M_out -exec rm -rf '{}' \;
Delete all files in (sub)folder(s) with name pose.pkl
find . -name pose.pkl -exec rm '{}' \;
Batch resize images
find . -iname "IMG_*.jpg" -exec convert '{}' -verbose -resize 1920x1440 '{}' \;
Video to images
ffmpeg -i HAD_20180418_113753_SVCam_right_compressed.m4v -r 30 scenes/waving_full_720p/image_%5d.jpg
Images to video
ffmpeg -framerate 24 -pattern_type glob -i '*.png' -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p -vf scale=1024x768 output.mp4
List all VS Code extensions
code --list-extensions | xargs -L 1 echo code --install-extension
List all disks with UUID
ls -l /dev/disk/by-uuid
Crop image (with imagemagkick)
convert -crop 200x490+230+230 00344.png 00344_crop.png
Crop multiple images (with imagemagkick)
mogrify -crop 200x490+230+230 -path ./cropped *.png