#!/bin/bash # Count the music files starting form MUSIC_BASE # Thanassis Bakalidis # 31-03-2007 # This is the directory containing all my music MUSIC_BASE=/mnt/Culture/My\ Mjavascript:void(0)usic # Add more music file extentions here MUSIC_EXTENTIONS="mp3 wma ogg flac" echo Base directory is $MUSIC_BASE TOTAL_FILES=0 for ext in $MUSIC_EXTENTIONS do echo "" echo Saerching for $ext files current=`find "$MUSIC_BASE" -type f -name "*.$ext" -print | wc -l` echo Located $current $ext files TOTAL_FILES=`expr $TOTAL_FILES + $current` done echo "" echo A total of $TOTAL_FILES music files were accounted. exit
All things relative to everyday programming and DBA practices, This blog will not give you the ET staff, just little remindings about how things work. Subjects are relative to databases, programming, Linux, Windows and ... you name it. I used to have a notepad onto which I put down anything I thought I might need again. Hopefully this is going to be as good as the paper with the added value of being able to paste from.
Saturday, 31 March 2007
Linux: How many songs do I have
I have always wanted to know the exact number of music files that I own. Of course Amarok appears to have the correct answer, still I always wanted to write something like that
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment