#!/bin/sh
echo Copyright: grimdestripador 2011 under Linux Mint forums agreement
echo This will find all flash video by searching mimetype=x-flv
date ; echo The following is where you cache is:
export cachePlace=`locate Cache | grep mozilla | grep -v Cache/ | grep /Cache`; echo $cachePlace
#Hint, I capitalize functions as one would a proper noun. As in "Hello! I'm Mr. Proper Noun, meet my friend Mrs. Proproper Function"
echo "Please have patience while your mozilla cache is searched. ETA > 1 Minute. During this time, you may read an explanation of its execution. \n This is an exercise in the use of piping. The program Find is used at the cache folder to execute Mimetype. Mime type then prints into the stream bufer its textual output with filename and mimetype. Lines not containing x-flv are removed using Grep. The rest of the stream is continued to be piped through Sed. Sed continues removing chunks of text evolving into a simple list of return-separated filenames. The current stream of filenames is piped into Xargs which repetitively executes Cp on each of the filenames."
date
find $cachePlace -type f -exec mimetype {} \; | grep x-flv | sed 's#: video/##g' | sed s/x-flv//g | xargs -I {} cp -v {} ~/Downloads/
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason:Topic automatically closed 6 months after creation. New replies are no longer allowed.
This makes my day. Someone actually read the comments burried in a descriptive comment. I also meant to type Mrs. Proper, but somehow i typoed Mrs. Proper to be Mrs. Proproper. And friend is an odd relationship for someone who has the same last name. Perhaps it should have been wife or sister.