Stupid UNIX Tricks: Find Videos You Posted To Twitter

“UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.” — Dennis Ritchie
  • for FILE in *.mp4 — This will perform a loop between do and done that will will populate $FILE for each filename that matches the *.mp4 pattern.
  • 2>&1 — This tells standard error to go to the same place standard output goes, this is so that it can be piped into…
  • pv — Pipeviewer! This is a neat command line app which shows the status of text that is flowing through it so that you know work is being done. From there, the text goes to
  • > output.txt — Where the output will be written. We are writing the results of this operation (as well as others) to a file, because inspecting a file containing the output is waaaaaay easier than having to run a time-consuming command repeatedly.
Ah, the good old days.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Douglas Muth

Douglas Muth

77 Followers

Engineer. AWS, CyberSec, DMARC, Docker, Splunk, White Mage. Staffs way too many cons. he/him. 28% Cheetah.