[SOLVED] Simple gui tool to search for files in Slackware?
SlackwareThis Forum is for the discussion of Slackware Linux.
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 don't use KDE on these machines - mainly because I want to squeeze as much speed out of them as possible. So catfish seems like the perfect tool for what I want. Thanks to all those who contributed with suggestions!
It built and installed with no issues; *looks* decent, and found 254 m4a files in a networked 30,000 file music directory in under a minute...so it seems ok initially....
Although you don't actually run KDE, you might consider using a KDE utility for this particular purpose. Dolphin has been mentioned above, but another one (not sure if it needs quite so much by way of KDE libraries either) is Krusader which is a bit like an MC clone for GUI deployment. I have both Dolphin and Krusader on KDE PCs and find the file search facilities in both are very useful. Dolphin is of course more fully KDE integrated but Krusader is nice if you are used to MC (including the old Function Key shortcuts).
Although you don't actually run KDE, you might consider using a KDE utility for this particular purpose.
The problem with this that starting any KDE utility will wake up a lot of other KDE services as well, so that you will end up with a lot of additional programs running that you did not ask for.
I think catfish sounds like a nice tool, and I will probably create a package for it - I use XFCE myself on some (low-end) machines where it will integrate nicely with Thunar.
Catfish is nice and integrates well with Thunar. Searchmonkey is also very good but doesn't integrate at all. As a stand-alone program though it's second to none. I've submitted searchmonkey to slackbuilds.org and will probably see if the catfish maintainer wants to update or allow me to submit for 13.37.
I have reached the point where I have to provide them with a file-search facility. I've been tempted to teach them how to use "find" on the command line, but I reached the conclusion that (and some might argue against this) it isn't exactly suitable for them to try an learn command line syntax.
It takes 2 minutes to learn how to use find on the CLI and your acquaintances will thank you for the rest of their lives. Once I taught a flashy Mac user how to use the terminal and he told me he felt reborn.
PCManFM-Mod file manager has search functionality builtin. I'm not sure original pcmanfm 0.5x has this feature or not, version 0.9x at slacbuilds.org doesn't.
The downside is - PCManFM-Mod doesn't support trash-bin.
Although you don't actually run KDE, you might consider using a KDE utility for this particular purpose.
My omission. I really should have written "I don't *install* KDE on these machines". Thus they don't even have the usual KDE libraries, and I prefer software which doesn't depend on them.
ottavio wrote:
Quote:
It takes 2 minutes to learn how to use find on the CLI and your acquaintances will thank you for the rest of their lives.
That might be so, or might be not. Many technical people seem to be under the impression that all other users in the world have the same mindset and the same capacity to learn technical stuff. I love CLI and use it a lot, but I can also see how other people are better off with a dumbed-down, "buttonized" interface. Also, there is plenty of other stuff to learn out there aside from computers. Some people just prefer to keep the computer related learning to a minimum.
Searchmonkey sounds interesting, although, as pointed out, doesn't integrate with Thunar.
FWIW, (BTW, no persuasion or argument intended) I tend to collect stuff/commands as can be seen below by the contents of my own
findh
which is an executable Perl script that, when ran, prints to screen many many example commands such as find, list files, cp files, rename files, and more. Once I've run findh then I just copy/paste to create my needed command.
I had dreamed to expand/build upon this ie Apache web server and CGI and Perl whereby a served up web page would query a user and user inputs answers into (form) fields on the web page which in turn would build their command for them then run the command and, lastly, return about the results. But, not enough around toits over the years thus findh is it so far.
Code:
al@P5Q:~/bin$ pwd
/home/al/bin
al@P5Q:~/bin$ cat findh
#!/usr/bin/perl
# findh prints example find useage
print "\nfilename accepts wildcards || Or try: locate filename\ncmd | top dir (recurses down) | opt -n denotes-> | name_of_file2find\n\n";
print "find /home -name filename\n--\n";
print <<STUFF;
find SBo/13.1/ -name "*.info" -exec grep -H 'MAINTAINER' {} \; | cut -d= -f2 | sort | uniq -c | sort -nr > maintainers.txt
find / -perm +04000 -exec ls -ld {} \\; 2> /dev/null > /tmp/SUID.files
find / -perm +02000 -exec ls -ld {} \\; 2> /dev/null > /tmp/SGID.files
# files larger than 2 megs. size.txt ordered list (see next 2 also)
find /home/al/ -xdev -size +2000k -print | xargs ls -ldS > ~/size.txt
# sed escapes spaces (makes the ls part work on MS Win folder/file names)
find . -xdev -size +2000k -print | sed 's/ /\\ /g' | xargs ls -ldS > ~/size.txt
# size is both listed and ordered also works on MS Win with spaces
find . -type f -size +50000k -exec ls -lhS {} \;
# replace space with underscore
find /your/path -iname "*" | while read fname ; do
"`echo "$fname" | sed 's/ /_/i'`"
done
# caution searches from / (all of al files on entire disk)
find / -xdev -user al -print | xargs ls -ldS > /home/al/alfil.txt
# change group
find /bin /sbin /usr/bin /usr/sbin -type f -group bin | xargs chgrp root
# all files under yum_repo that are less than 26 days old
find /home/al/yum_repo -mtime -26
# quote when pattern used in name portion
find /mnt/usbhd/rhel/yum_repo -name '*'
find /usr -name foobar.txt
find / -name foobar.txt # srch from root of HD
find / -iname '*.MP3' # case insensitive
find -amin -60 # files accessed less than 60 minutes ago
# redirect next to a file may serve as an install log of files installed
# find / -xdev -ctime -1 # finds new(ly) (software installed) files
^^^^ ^ ^^^^^ ^^^^^^ ^^ ^ ^^^^^ ^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^^^
perl -MFile::Find -le 'find sub{print if /\\.txt\$/}, "."'
# tested s/print/unlink/ to delete files
perl -MFile::Find -e 'find sub { print if /\\.txt\$/} , shift || "."'
my \@files = `find $dir -name '*.txt'`;
# files only also in cur dir only
find . -name '*' -maxdepth 1 -type f > ~/myfiles.txt
find . -name '*.htm' -maxdepth 1 -type f > ~/myfiles.txt
# cp files to /tmp/slackupdate (ok prompts, exec just does it)
find . -type f -name "*.txt" -maxdepth 1 -ok cp {} /tmp/slackupdate \\;
find . -type f -name "*.txt" -maxdepth 1 -exec cp {} /tmp/slackupdate \\;
find . -name '*.bak' -type f -exec rm {} \\;
# very powerful bulk rename ie s/?/_/ or s/ /_/ etc. in file names
find . -type f -name '*?*' -print0 | xargs -0 rename '?' '_'
scp -rp /mnt/hda5/home/carla carla\@192.168.1.5:/home/carla/tmp
# copies a folder recursively as a non root user to 2nd computer
scp pcdosbak.zip root\@192.168.1.6:/mnt/idehd
# copy to HD of sysresccd booted computer (passwd root)
locate command. To upgrade the database for the locate command do this while in the superuser mode: slocate -u. Then wait a while while it upgrades. To use the command just type locate mozilla (for example) and it will post all of the mozilla references in your computer.
slocate -u
STUFF
# end of findh
al@P5Q:~/bin$
Well, the blog post mentions "SNAPSE" - then the suggested command suppose to install "synapse". Which one is it? - and no link to the developer's website. Just trolling for free clicks? If that is the case - maybe the post should be reported and removed.
Really primitive and I know its already solved perhaps more effectively but I was interested so heres a python gui I put together that gives you locate results and opens them with thunar. Opening the non directory results will behave differently according to how you have thunar configured I think
Code:
#! /usr/bin/python
import commands
import os
import tkMessageBox
from Tkinter import *
#use locate on entered string
def locater(locatestr,nametxt):
#open selected result in thunar
def opendir():
index=int(resultslist.curselection()[0])
chosen=resultslist.get(index)
os.system("thunar '" + chosen+"'")
wind.title("Locating...")
locatestr=nametxt.get()
results=commands.getoutput("locate " + locatestr).splitlines()
#create a list of results that you can mousewheel through
resultbox=Tk()
resultbox.title("Results")
resultbox.geometry("310x600")
resultslist=Listbox(resultbox)
resultslist.pack(fill="both",expand=1)
#create a button to open selected directory
openbtn=Button(resultbox,text="Open", command=opendir)
openbtn.pack(side="left",fill="y",expand=1)
for result in results:
resultslist.insert(END,result)
#make a main tkinter window
wind = Tk()
count=0
wind.title("Pylocater")
wind.geometry('250x120')
#txt entry field
nametxt=Entry(wind)
nametxt.pack(expand=1,side="bottom",fill="x")
locatestr=nametxt.get()
#Button to call the locater function
locatebtn = Button(wind,text="Locate Files",command=lambda:locater(locatestr,nametxt))
locatebtn.pack({"side":"left"},expand=1,fill="x")
quitbtn = Button(wind,text="Quit",fg="red",command=quit)
quitbtn.pack({"side": "right"},expand=1)
mainloop()
Last edited by NeoMetal; 04-26-2012 at 09:43 PM.
Reason: fixes
a fast and little alternative is 'sgsearch' from Frank ENDRES.
I am using it in my little distro because of its very few deps.
It can be easiliy included as a custom action in Thunar/PCManFM, too.
You'll find it at h**p://sallu.tuxfamily.org
Regards,
Manfred
Last edited by FluxFlux; 02-15-2012 at 08:38 PM.
Reason: Forgot mentioning deps and filemanager integration
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.