Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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!
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.