|
|
![]() | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
![]() |
Years ago I wrote a small file finder in Bash and gtk-server. Here.. Why ? Linux has its own file database called (p)locate. At this time i found the file indexer of KDE or Gnome, which were totally CPU heavy and unnecessary. Last year i changed after 17 years from Debian unstable 32bit to Xubuntu 16.04 LTS 64bit. Unfortunately, the gtk-server no longer ran. Some additional Libs could not be compiled under 64bit. Since I had no desire to continue to pursue, I wrote the Searcher shorthand new with Perl/Tk.
FeaturesSearch for files and directories in a Linux/Unix-like directory structure.Quick search using the (p)locate database, particular search with find (Perl-Modul) in the current state, search for strings in files, search manual pages (manpages) with editor capabilities. Opens the file found with it's own previewer, an default application (xdg-open) or with an application of your choice. Search History for the last 100 search strings and clicked files. Multiple instances allowed. Depends on Perl >= 5.18 and Perl/Tk, recommended Perl 5.34. ![]() Perlcritic -3 inspected. ![]() Freeware, Open-source.
Changelog26. Mar. 2023 - Rework . Some Improvements, switched from mlocate to plocate. More programs to open files selectable, 12 instead of 8.31. Mar. 2023 - Added .. It's own Previewer based on Webkit. Added to the program selection menu Default Program and open Directory.
UsageMenuptkSearcher → Preferences: Choose font/fontsize and external applications ptkSearcher → Increase font size ++ ptkSearcher → Decrease font size -- ptkSearcher → Quit: On exit all settings and history entries are saved to ~/.ptksearcherrc Info → Search History: The last 100 search strings and clicked files are stored. A double-click on a search string in the history window sets the string into the input search slot of the raised search page e.g. Locate / Find / Man Page. A double-click on a file line opens the selected file with the default application via xdg-open. Info → Help: Help text Info → About: ptkSearcher Ignore case → on/off Reverse order → normal/reverse order. e.g. if output limit 200 and the result output is 800, you will see the first 200 lines in normal order and the last 200 lines in reverse order. Output limit → Set the max. number of output lines. 0 = no limit. Search with (P)LOCATE: locate - find files by name using a database. This is the quickest method to find files or directories. updatedb - creates or updates the database via cron daily. For working just in time it isnt actual. For more infos read the man pages of updatedb and cron/crontab. Directory to search: Select myHome(~/) or All(/) or /var or /usr ... Usage with pattern: '*' ⇒ '.*' → everything or nothing: *image → image, oldimage, newestimage ... '?' ⇒ '.' → exact 1 unknown character '[' , ']' → alternative characters: pic[AB].png → picA.png, picB.png, picAB.png, picBA.png image → exact match image*, *image, im*ge*.png, *.jpg, image?, [iI]mage*, charlie[123]* ... A double-click on a result line opens the selected file with the embedded previewer based on Webkit. On videos only, the video starts with ffplay (FFmpeg) if present. Otherwise with the default application. A right-click on a result line opens a popup menu with the applications of your choice to open the file or open the directory of the file. Search with FIND: Real searching on HDD for files or directories. Directories to search: Choose myHome(~/) and /etc and /var and /usr ... Select finding FILES or DIRECTORIES. MaxDepth indicates the max. Directory depth to search, default: 3. 0 = infinity Options: File Size → e.g. < <= >= > K, M, G : >10K , <200M , exact '1000' (Bytes) Name Length → e.g. < > : >7 , <40 , exact '25' (Characters) , myfile.png = 10 Characters Grep Files → Find text, word, phrase in files, case ignored. ASCII files only → ascii/text files (on) or ascii/binary files (off), select by mimetypes and heuristics. Is also working on e.g. *.pdf, *.doc ... FIND: Pattern → same as above Search for more than one string is possible by comma separated values. e.g. *.gz,*.zip ... *.gif,*.jpg,*.png,*.xcf ... without spaces A double-click on a result line opens the selected file with the embedded previewer based on Webkit. On videos only, the video starts with ffplay (FFmpeg) if present. Otherwise with the default application. A right-click on a result line opens a popup menu with the applications of your choice to open the file or open the directory of the file. Search Manual Pages: A simple editor window for the system's manual pager (man). Search for reference manuals of commands e.g. whatis, who, cp, gimp, perl ... All 'man' flags supported: e.g. 6 gnome-mines → manual page 6 for gnome-mines 3 iconv → manual page 3 for iconv
1 Executable programs or shell commands
-L en whois → -L = locale, en = english, whois = command you are looking for
InstallationThe Easy Debian Package Way for all Debian based distributions like Debian, Ubuntu, Mint etc.
Download the install_ptksearcher.zip file.
On Debian/Linux become root with su bash ./01install_deb_ptksearcher.bash
or on Ubuntu/Mint etc. sudo bash ./01install_deb_ptksearcher.bash Important: Type 'bash' and not 'sh', because 'sh' is 'dash' on Debian. Dash is a subset of Bash.
That's it. The Hard Way for all other linux/unix distributions.
Check if plocate present. → which plocate ↵
The Harder Way if one or more of the Perl Packages not present in your distribution.
Open a console, become root with su or type with sudo and install via CPAN.
Copy the downloaded file after unpacking 'ptksearcher' and 'ptksearcherviewer' to /usr/local/bin.
Download
| |||||||||||||||||||||
![]() | ||||||||||||||||||||||
![]() |
![]() | ![]() | ![]() | ||
![]() |
|
| ||
![]() | ![]() |