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.
locate mp3 will output any string in the mlocate database that contains the substring mp3 which is not necessarily a mp3 file. Could be a sub directory, library or any program name.
locate mp3 | grep gszaktilla will pipe the output of locate mp3 to grep which will filter the output more i.e. those strings that contain gszaktilla which may not be in the /home/gszaktilla directory.
If you want to count the number of files just in the /home/gszaktilla then use the command
/home/gszaktilla> ls *.mp3 | wc -l
To find just mp3 files use
locate .mp3
The contents of the mlocate database are only as good as the last time the updatedb comand was run which is via a cron job. Files recently deleted may still be in the database.
find searches the actual contents of directories versus using a database.
I don't know at the moment without see the actual output.
Well, the complete thing is there: What I typed and what it returned.
Quote:
Originally Posted by michaelk
To find all mp3 files in your home directory using the find command.
find /home/gszaktilla -iname "*.mp3" -print | wc -l
Uh, now I have a fourth number to think about. So far I have 14346, 6927, 14330 and 0 :-)
Life with Linux can be fun. I'm having fun since mid 90's.
Gregor
PS: The original problem still exists - rhythmbox only shows some 600 of >1000 mp3 files. The locate thing was a step in trying to build a playlist. rhythmbox shows <600 of that playlist :-/.
troubleshooting oneliners:
you need to remove the pipe and everything after it from these commands and see what they actually output.
rhythmbox:
- how do you measure "more than 1000"?
- how do you measure 611 (i guess rhythmbox told you so)
anyhoo, i don't see how we can help you here without additional information.
you need to compare the files in rhythmbox database to those actually present in your library (? your home directory?) and try to find a pattern.
troubleshooting oneliners:
you need to remove the pipe and everything after it from these commands and see what they actually output.
Which post are you referring to?
Quote:
Originally Posted by ondoho
rhythmbox:
- how do you measure "more than 1000"?
- how do you measure 611 (i guess rhythmbox told you so)
I don't have to measure ">1000". It is my music library. A playlist that I created before starting with Slackware has >1000 lines.
Quote:
Originally Posted by ondoho
anyhoo, i don't see how we can help you here without additional information.
you need to compare the files in rhythmbox database to those actually present in your library (? your home directory?) and try to find a pattern.
The only pattern so far is: The files found are recently added files OR a file is of type ogg.
Please let me know what further information you need.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.