LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-04-2016, 06:56 AM   #1
g00ey
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Rep: Reputation: 0
Question How to view search results in gthumb or similar software


Let's say I issue the command

locate background.png

Then I get a list of search hits for that. If I instead issue

locate background.png | xargs ls -l

I can get more information about each entry of the search results, such as file size, date of creation, etc.

But if I want to be able to view the results in a program such as gthumb and quickly browse through the search results in it, how do I issue the query then?

What program would be recommended if I instead did a search on .svgz files? gthumb doesn't support svgz.
 
Old 08-24-2016, 04:58 PM   #2
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
>But if I want to be able to view the results in a program such as gthumb and quickly browse through the search results in it, how do I issue the query then?

You can do something like

1) eog $( find *.jpg ) &

or in your case

2) gthumb $(locate background.png) &

The only problem you may have is with file names with spaces in them. I don't have gthumb but have eog graphics viewer and command #1 worked for all files except one that had spaces inside.

What program would be recommended if I instead did a search on .svgz files? gthumb doesn't support svgz.

This is to be expected. SVG is an XML-based vector graphics format. gthumb is a viewer for bitmapped graphics formats.

You should use inkscape as it is a Linux SVG editor. It opens up a window for each file on the command line.

[andrew@server47 status]
05:34 PM $ inkscape $(find *.svg) &
[2] 16662
[andrew@server47 status]
05:34 PM $ find *.svg
yelp-note-bug.svg
yelp-note-important.svg
yelp-note.svg
yelp-note-tip.svg
yelp-note-warning.svg

Five inkscape windows were opened with the command inkscape $(find *.svg) &
 
Old 08-24-2016, 06:40 PM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
You can pipe the output from the find command to a utility script that makes a folder of symlinks to the results. Put this in ~/linkem.sh:
Code:
#! /bin/bash
#
# Links files specified in stdin into ~/flist/

echo "Cleaning up ~/flist/"
mkdir ~/flist
rm -fvr ~/flist/*

x=1000001

while read -r line ; do
  dest="/home/kuo/flist/$x.jpg"
  echo "$dest -> $line"
  ln -s "$line" "$dest"
  ((x++))
done
Replace /home/kuo with your own home directory. Then, you can pipe the results of a "find" command (use full path) with something like this:
Code:
find /home/kuo/bak/pic/wall -type f -name "*ink*.jpg" | ~/linkem.sh
You can then use an image browser such as geeqie in ~/flist/

This is an unsophisticated script that I whipped up just now, but it could be refined into something more pleasant to use.
 
Old 08-25-2016, 11:48 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,137

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
As usual, the GUI is generally a better bet for this sort of thing (provided you have one, of course).

1. Start the file manager and choose the search option
or
2. Run the search tool from the menu.

Either way you will get a list of files and you can view any or all by double clicking. Simple!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Pass search results to awk, and use awk output to search other files bspears1 Linux - Newbie 8 07-21-2012 09:17 AM
LXer: gThumb: The Free Software IrfanView LXer Syndicated Linux News 0 04-28-2010 05:10 PM
Is there any application with same/similar functionality like Microsoft Shared View kalac Linux - Newbie 2 04-08-2009 05:04 PM
Help! Cant view poll results!!! ciden LQ Suggestions & Feedback 2 01-06-2008 05:06 AM
a good pdf view similar to acrobat? spyghost Linux - Software 8 09-06-2003 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration