Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 16 Feb 2020, 20:23
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Normal Linux commands to Locate your system files, INSTANTLY
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 9 of 13 [184 Posts]   Goto page: Previous 1, 2, 3, ..., 7, 8, 9, 10, 11, 12, 13 Next
Author Message
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2955
Location: USA

PostPosted: Sun 01 Mar 2015, 11:18    Post subject:  

musher0 wrote:
Hello, bunch! Smile

Speaking of useful cli programs missing in Puppy, there's tree, which Puppus
mentioned here :
http://murga-linux.com/puppy/viewtopic.php?p=830366&sort=lastpost#830366
With pretty fancy parameters, he created a full index of files on his computer.

BFN.

musher0


I like "tree". I use "tree -idf" which produces a "bare" format tree, perfect for using in batch files (I use the output list to build a script to cull empty folders from the system -- helps me locate things, when I don't have empties laying everywhere...)

I just pulled it from the Debian bundle -- under Lupu, there were no missing dependencies, or extra things needed,

_________________
Add swapfile
WellMinded Search
PuppyLinux.US Search
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2647

PostPosted: Sun 01 Mar 2015, 11:40    Post subject:  

mikeb, it's gtkdialog which is using locate to look for icons. It's pretty lame, and I think that goingnuts and/or I wrote that out for gtkdialog1 -in favor of looking directly in normal 'sane' locations.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11299

PostPosted: Sun 01 Mar 2015, 12:34    Post subject:  

Quote:
mikeb, it's gtkdialog which is using locate to look for icons. It's pretty lame, and I think that goingnuts and/or I wrote that out for gtkdialog1 -in favor of looking directly in normal 'sane' locations.


ah ok....I thought I had seen something else do it but it was a long time ago.

As it happens gtkdialog appears to be calling a deprecated glib function which throws up constant errors with combo boxes in Lucid and newer...so perhaps a recompile would be generally a good move.

And yes... items in standard locations help. In this case they were simply not added yet as was testing.

mike
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2647

PostPosted: Sun 01 Mar 2015, 13:34    Post subject:  

'standard locations', I had appended the following to the last sentence: "but that won't help much with Puppy", but then erased it. You can probably still see the eraser marks...
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11299

PostPosted: Sun 01 Mar 2015, 16:08    Post subject:  

living in the here and now Smile

mike
Back to top
View user's profile Send private message 
slavvo67

Joined: 12 Oct 2012
Posts: 1618
Location: The other Mr. 305

PostPosted: Sun 01 Mar 2015, 23:48    Post subject:  

Actually, by the time I read this.. you're here and now is already the past..... So, you're actually living in the past??
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11299

PostPosted: Mon 02 Mar 2015, 05:13    Post subject:  

I relooked at the gtkdialog sources...yes was removed indeed...I forgot it was used several times in the countrywizard and I only changed one instance lol ..gtkdialog for pop up messages..way to overkill. blond moment....

As for those combobox errors its a pile of gtk shite...they changed the function calls and methods 3 times in a couple of years...no one could keep up with that sort of crap behaviour...so ignore the errors time...or rebuild glib to not spew them out lol.

mike
Back to top
View user's profile Send private message 
Uten


Joined: 29 Jan 2008
Posts: 128

PostPosted: Mon 02 Mar 2015, 12:40    Post subject:  

Another find I stumbled upon while browsing for something else. This "trick" explains how to build a locate db of your cd collection. It does so by creating the locate.db by hand rather than using updatedb. It lets you add a short unique name to each cd file collection.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Mon 30 Mar 2015, 18:39    Post subject:  

How about using wildcards to search slocate database and listing selectable results in a yad gui?

This example for *.mp3 search.

Code:
#!/bin/sh
filext=`yad --title="Find files" --text="What are you looking for?:
e.g. *.mp3" \
--form \
--field="Type file name or extension:"`
filext=`echo "$filext" | cut -f1 -d '|'`
select=$(for f in `slocate "$filext"`; do echo $f ; done | yad --list --multiple --center --height="400" --column="App Icons:" --print-column="1" --separator=" ")
ret=$?
[[ $ret -eq 1 ]] && exit 0
if [[ $ret -eq 0 ]]; then
vlc $select &
fi


need to invoke mimetype associations somewho to use the result with the right app.
Back to top
View user's profile Send private message MSN Messenger 
musher0

Joined: 04 Jan 2009
Posts: 14769
Location: Gatineau (Qc), Canada

PostPosted: Mon 30 Mar 2015, 19:05    Post subject:  

stemsee wrote:
How about using wildcards to search slocate database and listing selectable results in a yad gui?

This example for *.mp3 search.

Code:
#!/bin/sh
filext=`yad --title="Find files" --text="What are you looking for?:
e.g. *.mp3" \
--form \
--field="Type file name or extension:"`
filext=`echo "$filext" | cut -f1 -d '|'`
select=$(for f in `slocate "$filext"`; do echo $f ; done | yad --list --multiple --center --height="400" --column="App Icons:" --print-column="1" --separator=" ")
ret=$?
[[ $ret -eq 1 ]] && exit 0
if [[ $ret -eq 0 ]]; then
vlc $select &
fi


need to invoke mimetype associations somewho to use the result with the right app.


Hi, stemsee.

Does that work? slocate uses sort of "piling up plus differential"
references in its db to keep it small. Does your script expand those
"references" into human-readable lines?

I mean:
slocate can decipher its own db lines and present the result to the user in
a readable form, but can an external program such as yad do it?

Maybe a screen cap would help me understand. Thanks in advance.

Best regards.

musher0

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14769
Location: Gatineau (Qc), Canada

PostPosted: Mon 30 Mar 2015, 19:10    Post subject:  

Uten wrote:
Another find (...)


Interesting page!

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Tue 31 Mar 2015, 03:52    Post subject:  

Corrected code. If you select several files in this case mp3 files they will be listed in vlc ie queue list. Just needs a function to select app per extension. If $select = *.mp3 open $app. etc

Could seperate dirname and basename fields for easier display in yad list.

Code:
#!/bin/sh
filext=`yad --title="Find files" --text="What are you looking for?:
e.g. *.mp3" --form --field="Type file name or extension:" `
filext=`echo "$filext" | cut -f1 -d '|'`
select=$(for f in `slocate "$filext"`; do echo $f ; done | yad --list --multiple --center --height="400" --column="$filext:" --print-column="1" --separator=" ")
ret=$?
[[ $ret -eq 1 ]] && exit 0
if [[ $ret -eq 0 ]]; then
vlc $select &
fi
capture24731.jpg
 Description   
 Filesize   9.76 KB
 Viewed   161 Time(s)

capture24731.jpg

capture25671.jpg
 Description   
 Filesize   29.25 KB
 Viewed   163 Time(s)

capture25671.jpg


Last edited by stemsee on Tue 31 Mar 2015, 05:53; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Tue 31 Mar 2015, 04:16    Post subject:  

Ok, made another yad list of desktop files to select app to open file/s. Now just needs someone to combine these three yad gui elements into one dynamic gui. Then slocate wil have its own gui.

It would be nice to search a name and then select several files with different extensions and have them each open with the correct app automatically. I have no clue how to achieve that simply!?

Code:
#!/bin/sh
filext=`yad --title="Find files" --text="What are you looking for?:
e.g. *.mp3" --form --field="Type file name or extension:" `
filext=`echo "$filext" | cut -f1 -d '|'`
select=$(for f in `slocate "$filext"`; do echo $f ; done | yad --list --multiple --center --height="400" --column="$filext:" --print-column="1" --separator=" ")
ret=$?
[[ $ret -eq 1 ]] && exit 0
if [[ $ret -eq 0 ]]; then
app=$(for f in `ls /usr/share/applications`; do echo $f | cut -f1 -d '.' ; done | yad --list --multiple --center --height="400" --column="Select app to open $filext:" --print-column="1" --separator=" ")
ret=$?
$app $select &
fi
capture4265.jpg
 Description   
 Filesize   38.02 KB
 Viewed   153 Time(s)

capture4265.jpg

Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Tue 31 Mar 2015, 06:35    Post subject:  

Of course on EmSee-Ultra the app list is unmanageable! Better to link the most useful apps into some dir and list that in yad, for speed and manageability.
Back to top
View user's profile Send private message MSN Messenger 
musher0

Joined: 04 Jan 2009
Posts: 14769
Location: Gatineau (Qc), Canada

PostPosted: Tue 31 Mar 2015, 16:10    Post subject:  

Thanks for your hours of hard work, stemsee.
_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 9 of 13 [184 Posts]   Goto page: Previous 1, 2, 3, ..., 7, 8, 9, 10, 11, 12, 13 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0743s ][ Queries: 12 (0.0050s) ][ GZIP on ]