Searching files with KDE Dolphin

Discussions Regarding Software

Moderator: Moderators

Searching files with KDE Dolphin

Postby linuxfluesterer » Sat Oct 20, 2012 20:02

Hallo, all together.
I'm using KDE 4.9.2 with its file manager Dolphin.
So far, so good.
But since long time, I want to find files in a folder and its subfolders, which are greater than (e.g.) 100 MBytes.
Another example is files between date from to date until. Nepomuk is running, but I dont know, its working correct or not.

Or there is another problem. It seems, files are not really found, when hidden (leading .) Do you have experience with something like that?

To both subtopics I'd really appreciate an idea,
for first, maybe a link to a URL would great.
I've tried to find, but what I've got was not much about search, only one side talks about KFind, but this will not be opend in any Menu entry...
And the official Dolphin manual says nothing about searching.

Thanks in advance.

-Linuxfluesterer (I love KDE ...)
linuxfluesterer
Advanced Hen
 
Posts: 240
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: Searching files with KDE Dolphin

Postby Fitzcarraldo » Mon Oct 22, 2012 15:09

Well, I don't use Dolphin's GUI features much, but I'll show you how I'd do it (cheating a bit).

Let's say I wanted to find any files that I put recently in my directory /home/fitzcarraldo/Pictures/. I'd launch Dolphin and browse to the directory /home/fitzcarraldo/Pictures/ then I would press F4 and a terminal pane would open at the bottom of the Dolphin window. Then I would use the command find . -mtime +0 -mtime -<n>, where <n> is the number of days before now. For example, below is what was displayed in that Dolphin pane just now when I used that command:

Code: Select all
$ find . -mtime +0 -mtime -10
$ find . -mtime +0 -mtime -15
$ find . -mtime +0 -mtime -20
./Icons/zbar.png
$

As you can see from the output, there were no files in that directory and its subdirectories created in the last 15 days but there was a single file created in the last 20 days. Just to prove to you that the date I created that file was indeed within the last 20 days, I entered the command:

Code: Select all
$ ls -la ./Icons/zbar.png
-rw-r--r-- 1 fitzcarraldo users 7790 Oct  5 06:16 ./Icons/zbar.png
$


Now, what if I wanted to find all files in my directory /home/fitzcarraldo/Downloads/ and its subdirectories that are bigger than, let's say, 5 MB? I'd launch Dolphin and browse to that directory. Then I'd press F4 and a terminal pane would open at the bottom of the Dolphin window. Then I would use the command find . -size +5000k. For example, this is what was displayed in that Dolphin pane just now when I used that command:

Code: Select all
$ find . -size +5000k
./IE8-WindowsXP-x86-ENU.exe
./visioviewer.exe
./Sabayon_Linux_10_amd64_Xfce.iso
./Machinarium/Machinarium-Demo-EN.tar.gz
./Machinarium/Machinarium_full_en_v3.tar.gz
./Machinarium/Machinarium-full_en_v3.exe
./Machinarium/MachinariumSoundtrack.zip
./MyPhoneExplorer_Setup_1.8.4.exe
$

Just to prove to you that those files are indeed bigger than 5000k, I entered the following commands in that Dolphin pane:

Code: Select all
$ ls -lh ./IE8-WindowsXP-x86-ENU.exe
-rw-r--r-- 1 fitzcarraldo users 17M Sep  6  2011 ./IE8-WindowsXP-x86-ENU.exe
$ ls -lh ./visioviewer.exe
-rw-r--r-- 1 fitzcarraldo users 7.7M Sep  4  2011 ./visioviewer.exe
$ ls -lh ./Sabayon_Linux_10_amd64_Xfce.iso
-rw-r--r-- 1 fitzcarraldo users 1.4G Oct 14 17:37 ./Sabayon_Linux_10_amd64_Xfce.iso
$ ls -lh ./Machinarium/Machinarium-Demo-EN.tar.gz
-rw-r--r-- 1 fitzcarraldo users 33M Oct  1  2010 ./Machinarium/Machinarium-Demo-EN.tar.gz
$ ls -lh ./Machinarium/Machinarium_full_en_v3.tar.gz
-rw-r--r-- 1 fitzcarraldo users 344M Oct  1  2010 ./Machinarium/Machinarium_full_en_v3.tar.gz
$ ls -lh ./Machinarium/Machinarium-full_en_v3.exe
-rw-r--r-- 1 fitzcarraldo users 347M Oct  1  2010 ./Machinarium/Machinarium-full_en_v3.exe
$ ls -lh ./Machinarium/MachinariumSoundtrack.zip
-rw-r--r-- 1 fitzcarraldo users 129M Oct  1  2010 ./Machinarium/MachinariumSoundtrack.zip
$ ls -lh ./MyPhoneExplorer_Setup_1.8.4.exe
-rw-r--r-- 1 fitzcarraldo users 6.5M Oct 10 23:11 ./MyPhoneExplorer_Setup_1.8.4.exe
$

And, just to show you that it does find hidden files too, I created a hidden file:

Code: Select all
$ cp MyPhoneExplorer_Setup_1.8.4.exe .testfile
$ ls -lh .testfile
-rw-r--r-- 1 fitzcarraldo users 6.5M Oct 22 14:54 .testfile

and then I used the command again to find files larger than 5MB:

Code: Select all
$ find . -size +5000k
./IE8-WindowsXP-x86-ENU.exe
./visioviewer.exe
./Sabayon_Linux_10_amd64_Xfce.iso
./.testfile
./Machinarium/Machinarium-Demo-EN.tar.gz
./Machinarium/Machinarium_full_en_v3.tar.gz
./Machinarium/Machinarium-full_en_v3.exe
./Machinarium/MachinariumSoundtrack.zip
./MyPhoneExplorer_Setup_1.8.4.exe
$

Notice that the hidden file is also listed? :-)

If one prefers the GUI, one could instead click on View and tick 'Show Hidden Files', then select View > 'Sort By' > Size.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Searching files with KDE Dolphin

Postby linuxfluesterer » Mon Oct 22, 2012 17:54

Hallo (cheating) Fitzcarraldo :wink:
Well, I don't use Dolphin's GUI features much, but I'll show you how I'd do it (cheating a bit).

I've tried your cl-suggestion, sure it works, and to give you a suggestion also, that you save cl entries to do,
I executed the following (for your example to find files with size bigger than 5 MBytes):
Code: Select all
ls -lh $(find . -size +5000k)

With this command you can search and in the same moment, you get the information you want.
But I've got a big problem, if the file names contain spaces. Then the directory with spaces can not be found, because only the first word of the directory is read (e.g. ./MTV Movies/xxxx.mp3) Here MTV can not be found!
So ... this was not my question. I really would have expected that such a complex program like Dolphin is,
it should be able to offer this function (I don't want mention ancient (joking) Win XP File Explorer here).
And my hope was, that file names with spaces (such like music titles) could be handled by Dolphin.
The thing is also, I can work with cl commands, and I appreciate that, but they are rather difficult to understand for me and I forget the matching parameters after some time...
So, thank you at all for give me your way to find.

Good evening,

-Linuxfluesterer (I love KDE ... )
linuxfluesterer
Advanced Hen
 
Posts: 240
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: Searching files with KDE Dolphin

Postby Fitzcarraldo » Mon Oct 22, 2012 22:40

linuxfluesterer wrote:But I've got a big problem, if the file names contain spaces. Then the directory with spaces can not be found, because only the first word of the directory is read (e.g. ./MTV Movies/xxxx.mp3) Here MTV can not be found!

Not sure what you're doing there, linuxfluesterer, as it works for me. Although I avoid creating directories and files with spaces in their names (spaces in file names are bad practice), sometimes other people do use spaces. To show that the find command still works with spaces in directory names and in file names, in my directory /home/fitzcarraldo/Music/ I created a directory named Test Music and in it a file named 10CC Im Not In Love.aac and I also downloaded an album from Jamendo with spaces in the file names (e.g. 07 - Diablo Swing Orchestra - Gunpowder Chant.mp3):

$ pwd
/home/fitzcarraldo/Music

$ ls -1
10CC Im Not In Love.aac
10CC_-_Im_Not_In_Love.aac
BARRY_MANILOW_-_Mandy.aac
CARPENTERS_-_Close_To_You.aac
CARPENTERS_-_Rainy_Days_And_Mondays.aac
CARPENTERS_-_Song_For_You.aac
CHERRY_GHOST_-_Mathematics.aac
CHICAGO_-_If_You_Leave_Me_Now.aac
DIABLO_SWING_ORCHESTRA_-_The_Butcher's_Ballroom
JAMES_TAYLOR_-_Greatest_Hits.aac
KLAUS_SCHULZE_-_Timewind.aac
RUSS_BALLARD_-_I_Dont_Believe_In_Miracles.aac
Test Music

Now, let's say I want to know which of those files are between 2.9 MB and 3 MB:

$ find . -size +2900k -size -3000k
./BARRY_MANILOW_-_Mandy.aac
./10CC_-_Im_Not_In_Love.aac
./DIABLO_SWING_ORCHESTRA_-_The_Butcher's_Ballroom/07 - Diablo Swing Orchestra - Gunpowder Chant.mp3
./Test Music/BARRY_MANILOW_-_Mandy.aac
./Test Music/10CC Im Not In Love.aac
./10CC Im Not In Love.aac

As you can see, it finds all the files, including those with spaces in the file names, and including those in directories with spaces in the directory name.

By the way, in KDE you'll find a couple of useful widgets named BasKet Note Pads and KJots. You can add either of them to your Panel (or your Desktop) and keep notes in them so you will never need to look far to find a command (they have a Search field too) even if you have a bad memory and cannot remember commands. Actually I prefer Tomboy Notes, so I have that in my Panel rather than BasKet or KJots. If I'm not connected to the Web I can still click on it and look up a command in my notes in seconds. It's a good habit to get into, and I've been doing it for quite a few years.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Searching files with KDE Dolphin

Postby Stupot » Tue Oct 23, 2012 3:46

What's funny is that before the dolphin rewrite back in 4.7 or 4.8 (around that time anyway), ctrl+f would bring up a search box which used to have all those options in there, beyond just the standard word search. I'm not sure how to do it in the dolphin of 4.9 either. It sure seems like that ability was lost (or is impossible to find...)
Stupot
Sagely Hen
 
Posts: 1012
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Searching files with KDE Dolphin

Postby Stupot » Tue Oct 23, 2012 3:47

I just noticed there is a green 'plus' sign underneath the bar on the far right. Clicking on that seems to bring up a couple more options, but they are all greyed out for me and still don't include sizes, just date and 'rating's.

Edit: I enabled nepomuk and those choices aren't greyed out anymore. Still doesn't have size, not sure if that can be added.
Stupot
Sagely Hen
 
Posts: 1012
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Searching files with KDE Dolphin

Postby Fitzcarraldo » Tue Oct 23, 2012 4:29

Stupot wrote:What's funny is that before the dolphin rewrite back in 4.7 or 4.8 (around that time anyway), ctrl+f would bring up a search box which used to have all those options in there, beyond just the standard word search. I'm not sure how to do it in the dolphin of 4.9 either. It sure seems like that ability was lost (or is impossible to find...)

You mean the following?:



http://www.linuxjournal.com/article/10911
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Searching files with KDE Dolphin

Postby Stupot » Tue Oct 23, 2012 5:48

Well, that has a lot more than what it has in 4.9, but I know that in 4.3.x is actually pops up a separate dialog box (I use CentOS at work, which has KDE 4.3).

But for now all we get is this: http://i.imgur.com/bdujT.png

I'm not sure if there is a way to enabled a more advanced search, but it certainly seems like nepomuk has the capabilities.
Stupot
Sagely Hen
 
Posts: 1012
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Searching files with KDE Dolphin

Postby linuxfluesterer » Tue Oct 23, 2012 13:57

Hallo members...
I was on a wrong way or better, I found the right program to find my files in a gui window.
While my selection is still greyed in Dolphin search, when I click the green '+' sign and I can't tick anything,
I can use KFind with KRunner (Alt+F2).
Here now I can enter attributes including age and size.
This is a step forward for me, I receive the results in a window, with no problems on directory name including spaces.

I think, I will close this topic now.

Thanks for your support!

-Linusfluesterer (I love KDE ... )
linuxfluesterer
Advanced Hen
 
Posts: 240
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: Searching files with KDE Dolphin

Postby Fitzcarraldo » Tue Oct 23, 2012 16:35

Stupot wrote:Well, that has a lot more than what it has in 4.9, but I know that in 4.3.x is actually pops up a separate dialog box (I use CentOS at work, which has KDE 4.3).

But for now all we get is this: http://i.imgur.com/bdujT.png

I'm not sure if there is a way to enabled a more advanced search, but it certainly seems like nepomuk has the capabilities.

You might find the following two pages interesting (sad) reading:

1. Blog post by ex Dolphin developer Peter Penz: Search Improvements.

2. KDE Bug Report No. 253398.

Peter Penz 2011-05-21 20:37:41 UTC wrote:The bug is fixed for Konqueror in 4.7 but it is not planned to add the entry in Dolphin.


Looks like the KDE developers decided to 'improve' Dolphin. :roll:
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Next

Return to Software in General

Who is online

Users browsing this forum: No registered users and 0 guests