LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-12-2012, 08:01 PM   #1
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
How can I get a count of my mp3 files?


I want a script that can tell me the total number of mp3 files I have in my music collection. I've kept on through the last few years until I have all my music albums on a hard drive in mp3 format. These are listed in the format /music/artist/album/mp3s.
Code:
ls -R /music
piped through an additional command or group of commands might accomplish this. I have Tellico installed and it is great but I must confess I don't have the entire collection ripped because some I just don't want to rip and store that way because they are eg: Christmas albums, "Romance Hits Of The Eighties" - these I would not want cluttering my HDD because I use MPD and NCMPCPP to play music with my headphones while on the computer sometimes and said clutter would make browsing - well, cluttered. So has anybody got a script I can use to do this with? I have researched and read manuals but it is elluding me. I've been wanting to do this for several years but I keep getting put off by my alter self with statements like "It's not important" and "You're kidding, right?" and "Why do you want to know?" Not terribly important but I suspect knowing how to do this would be of help in a future endeavor. Who knows, it might even help somebody else who has wondered the same thing. Thanks ahead of time, friends.
 
Old 10-12-2012, 08:10 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
So basically you are saying: "I am to lazy for years now to look up some commands, so I ask you to do it for me".

Sorry, but no, as a long time member you should know that this is not the way it works on LQ. Nonetheless I will give you a hint: Look up on the commands find and wc, they are all you need.
 
Old 10-12-2012, 09:58 PM   #3
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
Quote:
Originally Posted by TobiSGD View Post
So basically you are saying: "I am to lazy for years now to look up some commands, so I ask you to do it for me".

Sorry, but no, as a long time member you should know that this is not the way it works on LQ. Nonetheless I will give you a hint: Look up on the commands find and wc, they are all you need.
Actually I'm not lazy. I conceived this thread with the idea of sharing information about the different ways of doing the same thing. A way of getting a variety of people interested and involved in a casual and maybe fun thing. Not only do I resent being called lazy but I also resent your opinion of "the way it works on LQ". There should be a multiplicity of ways things work on LQ, not just your way. I think you have the hidden agenda of pushing away people who use anything other than Slackware. Yes, I'm a long time user. And I've watched Slackware users develop an attitude of superiority on these forums, almost like they own LinuxQuestions.org. This is not the first time you have shown aggression toward me for no good reason. I suggest you try to see things from a less lofty perspective and lighten up.
 
Old 10-12-2012, 11:12 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
http://www.linuxquestions.org/questi...0/#post4803603
 
1 members found this post helpful.
Old 10-12-2012, 11:52 PM   #5
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
Quote:
Originally Posted by suicidaleggroll View Post
Sweet. Just for kicks and giggles I navigated to my music directory and tried
Code:
ls -R | grep .mp3 | wc -l
and it produced the results I wanted. 7408 mp3 files. Your suggestions shown in the link you provided are very good and provoke some alternatives for some other stuff I want to do too. Thanks a ton!
 
Old 10-13-2012, 05:09 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by SharpyWarpy View Post
Not only do I resent being called lazy
So how else would you call that:
Quote:
I've been wanting to do this for several years but I keep getting put off by my alter self with statements like "It's not important" and "You're kidding, right?" and "Why do you want to know?"
Isn't this the definition of procrastination, which is nothing more than being lazy?

Quote:
I also resent your opinion of "the way it works on LQ".
The general consent about the way it works is that you put in at least minimal effort and then ask questions if you have difficulties. You specifically tell us that you can't be bothered with this effort for years. A simple web search with "Bash how to count files" gives over 4.5 million hits, with answers to your question in the first 10 hits.
Nonetheless I have given you the two commands you need to solve this question, but instead of just having a look of how they work you still complain.

Quote:
I think you have the hidden agenda of pushing away people who use anything other than Slackware.
That is interesting. Where did you get this from? May be you should use the search on this forum, look for threads I am involved in that are not Slackware related and after you have read a bunch of them judge again if I am a helpful member of this community and pushing non-Slackware users away.

Quote:
This is not the first time you have shown aggression toward me for no good reason.
In that case you should report the posts where you think this happened.

Anyways, this is offtopic, if you want to discuss this any further please contact me via PM or email. If you think that I act unjustly you can also contact any other moderator or Jeremy.

Last edited by TobiSGD; 10-13-2012 at 05:11 AM.
 
Old 10-13-2012, 05:29 AM   #7
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
Quote:
Originally Posted by TobiSGD View Post
So how else would you call that:
Isn't this the definition of procrastination, which is nothing more than being lazy?

The general consent about the way it works is that you put in at least minimal effort and then ask questions if you have difficulties. You specifically tell us that you can't be bothered with this effort for years. A simple web search with "Bash how to count files" gives over 4.5 million hits, with answers to your question in the first 10 hits.
Nonetheless I have given you the two commands you need to solve this question, but instead of just having a look of how they work you still complain.

That is interesting. Where did you get this from? May be you should use the search on this forum, look for threads I am involved in that are not Slackware related and after you have read a bunch of them judge again if I am a helpful member of this community and pushing non-Slackware users away.

In that case you should report the posts where you think this happened.

Anyways, this is offtopic, if you want to discuss this any further please contact me via PM or email. If you think that I act unjustly you can also contact any other moderator or Jeremy.
Don't you have something better to do? I guess not. Now, leave me alone.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Script count files in the directory but keep loop not exit untill see 10 files. dotran Linux - Newbie 9 12-22-2014 04:34 AM
Count files in dir then move that many files in a script? chuckycharms Linux - Newbie 3 12-18-2009 11:31 AM
not able to play mp3 files and install vlc & mp3 players in fedora 8 harit agarwal Linux - Software 5 12-22-2008 04:50 PM
Portable MP3 player with corrupted mp3 files today53 SUSE / openSUSE 1 05-22-2006 09:24 AM
XMMS fails to open some mp3 files, while opening some other mp3's ditch* Linux - Software 3 03-05-2005 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration