LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   How can I get a count of my mp3 files? (http://www.linuxquestions.org/questions/linux-general-1/how-can-i-get-a-count-of-my-mp3-files-4175431938/)

SharpyWarpy 10-12-2012 09:01 PM

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.

TobiSGD 10-12-2012 09:10 PM

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.

SharpyWarpy 10-12-2012 10:58 PM

Quote:

Originally Posted by TobiSGD (Post 4804372)
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.

suicidaleggroll 10-13-2012 12:12 AM

http://www.linuxquestions.org/questi...0/#post4803603

SharpyWarpy 10-13-2012 12:52 AM

Quote:

Originally Posted by suicidaleggroll (Post 4804425)

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!

TobiSGD 10-13-2012 06:09 AM

Quote:

Originally Posted by SharpyWarpy (Post 4804405)
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.

SharpyWarpy 10-13-2012 06:29 AM

Quote:

Originally Posted by TobiSGD (Post 4804558)
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.


All times are GMT -5. The time now is 07:47 AM.