LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-29-2019, 11:27 AM   #1
e_james
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Rep: Reputation: 0
File search, sort and view.


Windows XP has a rather useful file search facility. I can search multiple folders, partitions and drives for jpg files and sort the results by size, name, date etc. That much I can also do in Linux. With XP I can also open a picture viewer and scan through the images in the sorted order. If there is a way to do that in Linux, I haven't found it yet. Every Linux viewer I have tried so far, looks only at the folder of the file I viewed first. Just at this time the XP behaviour would be very useful. Any suggestions?
 
Old 01-29-2019, 11:32 AM   #2
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: Debian
Posts: 900

Rep: Reputation: 290Reputation: 290Reputation: 290
Can't you give a list of sorted files to your Linux picture viewer via a pipe for example?
 
Old 01-29-2019, 12:06 PM   #3
e_james
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Original Poster
Rep: Reputation: 0
Thank you for your reply.

The benefit of gui software is that I can usually muddle through to a satisfactory result without learning many of the details of the application. The problem with the command line is that every letter, dot, dash and comma has to be right and the man pages are almost useless for new users. Can you give me an example command to get me started?
 
Old 01-29-2019, 04:49 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I use feh as my quick photo viewer - it accepts a file of filenames. You could also use xargs piped from the find command - these should work.
Code:
feh -f photos.lst
ls Pictures/*beach* | xargs feh
find Pictures/ -iname "*beach*jpg" | xargs feh
 
Old 01-30-2019, 05:03 AM   #5
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: Debian
Posts: 900

Rep: Reputation: 290Reputation: 290Reputation: 290
Quote:
Originally Posted by syg00 View Post
Code:
ls Pictures/*beach* | xargs feh
find Pictures/ -iname "*beach*jpg" | xargs feh
Beware of filenames with special characters, you could run into trouble with those 2 commands...
I suggest (please note I don't use feh myself so it's only theory here applied to your previous post):
Code:
for file in Pictures/*beach*; do echo "$file"; done | feh
find Pictures/ -iname "*beach*jpg" -print0 | xargs -0 feh
find Pictures/ -iname "*beach*jpg" -exec feh "{}" \;

Last edited by l0f4r0; 01-30-2019 at 05:06 AM.
 
Old 01-30-2019, 05:11 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Not me - I know how to name files ....
Others may need to heed your warning.
 
Old 01-30-2019, 09:09 AM   #7
e_james
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Original Poster
Rep: Reputation: 0
My thanks to both of you. Consider the problem solved as of now. For the benefit of other possible readers, I want to write more but I'm a bit pressed for time just now. I will come back later.
 
Old 01-30-2019, 09:59 AM   #8
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: Debian
Posts: 900

Rep: Reputation: 290Reputation: 290Reputation: 290
^ Great. Do not hesitate to mark your thread as [SOLVED] then (see HOWTO in my sig) and keep us posted with what you "want to write more"
 
  


Reply



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
Can I use GNU sort to sort one field in order, another in reverse? zombieite Linux - Newbie 4 04-27-2009 12:23 AM
php sort help - sort numerical descending then by alphabetical? RavenLX Programming 3 03-11-2009 08:35 AM
How do I do filtering in Perl (keep sort order and sort again by another means)? RavenLX Programming 9 12-19-2008 10:12 AM
selection sort compiles but does not sort the array as desired ganesha Programming 2 04-20-2008 07:44 AM
Is there a line limit with the sort utility? Trying to sort 130 million lines of text gruffy Linux - General 4 08-10-2006 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 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