add find multiple video files function to bash aliases
This commit is contained in:
1 parent
b92bdbea7d
commit
f8f0fd6fad
1 file changed
+14
@@ -199,3 +199,17 @@ dircreate() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
find_multi_video_dirs() {
|
||||||
|
local exts='mkv|mp4|avi|mov|m4v|wmv|flv|webm|ts'
|
||||||
|
|
||||||
|
find . -type d -print0 |
|
||||||
|
while IFS= read -r -d '' dir; do
|
||||||
|
count=$(find "$dir" -maxdepth 1 -type f \
|
||||||
|
| grep -Ei "\.($exts)$" \
|
||||||
|
| wc -l)
|
||||||
|
|
||||||
|
if (( count > 1 )); then
|
||||||
|
echo "$count videos: $dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
Reference in new issue
Block a user