Skip to content

Instantly share code, notes, and snippets.

@kairusds
Last active September 9, 2022 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kairusds/282ad750b68a69a3de87d326bf4369cd to your computer and use it in GitHub Desktop.
Save kairusds/282ad750b68a69a3de87d326bf4369cd to your computer and use it in GitHub Desktop.
Some useful single line linux commands
# Fix date time of files and subdirectories inside the specified directory
find ~/dir -print -exec touch -m {} \;
# Generate a video with a still image and audio
ffmpeg -r 1 -loop 1 -i bg.jpg -i audio.mp3 -c:v libx264 -tune stillimage -c:a copy -pix_fmt yuv420p -shortest still_img_vid.mp4
# Trim videos in hours:minutes:seconds format
ffmpeg -i video.mp4 -ss 00:01:00 -to 00:03:05 -c copy trimmed_video.mp4
# Get ssh public key from a private key
ssh-keygen -y -f key.pem > key.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment