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 Fri 31 Oct 2014, 17:28
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Pfind 5.14
Post new topic   Reply to topic View previous topic :: View next topic
Page 8 of 40 [599 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, ..., 38, 39, 40 Next
Author Message
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Mon 08 Oct 2007, 06:23    Post subject:  

Hi, sorry - I've got to go to bed, so I can't really read closely and try to figure out how to get an output from the command line in the same format as the pfind-treeitems... file - also, it is in a different order - I guess pfind is sorting it in some way.

As you can see, it finishes like this:
Code:
/mnt/hdb6/Upstairs/11-3-06.mp3|44142051|1998/01/01 - 14:48:44|-rwxr-xr-x|root
/mnt/hdb6/Upstairs/Messer001.mp3|182194387|2007/04/08 - 07:06:34|-rwxr-xr-x|root
/mnt/hdb6/Upstairs/Messer002.mp3|108292516|2007/03/04 - 06:59:02|-


If I remove the mp3 from the name of that last file, it has exactly the same results, finishing with the next file:
Code:
/mnt/hdb6/Upstairs/Messer003.mp3|155037071|2007/04/15 - 07:05:04|-
There doesn't seem to be anything unusual about these files except they are big, and that can't be causing the problem as I had the same issue with a search for text files. I have no idea what else to look at, so if you have any suggestions...

NB. Also, after it builds the symlinks, the pfind-treeitems... file is correct - but it sounds like you might be expecting that.
--------------------------
Wait a minute - I just tested with a search for txt on my Linux ext3 partition - it came up with 59 hits, and the pfind-treeitems... file was complete, but it has the same behaviour - builds hits, but never opens the text editor. But wait - it doesn't do the thing of reopening pfind when closed if I'd clicked a button to display only some of the results. So maybe there are two separate issues here.
txt1.gz
Description 
gz

 Download 
Filename  txt1.gz 
Filesize  1.87 KB 
Downloaded  343 Time(s) 
pfind-treeitems1267.gz
Description 
gz

 Download 
Filename  pfind-treeitems1267.gz 
Filesize  5.05 KB 
Downloaded  329 Time(s) 
find.gz
Description 
gz

 Download 
Filename  find.gz 
Filesize  3.36 KB 
Downloaded  359 Time(s) 
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Mon 08 Oct 2007, 08:47    Post subject:  

This was a tricky one, but let's not give up yet.

Can you please give me:
1. /tmp/pfind-files - This file shows the result of 'find'
2. /tmp/pfind-view - This is the files to be in the overview list.
3. /tmp/pfind-treeitems - This is the syntax for gtkdialog tree-view.
4. result of find /mnt/hdb6 -iname *mp3*
5. result of find /mnt/hdb6 -iname *mp3* -printf "%p|%s|%CY/%Cm/%Cd - %CT|%M|%u\n"

Nr. 4 should be equal to pfind-files and pfind-view. Nr. 5 should be equal to pfind-treeitems.

I wonder if anyone else got an experience close to this. If you read this, please give your report.

Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Mon 08 Oct 2007, 16:18    Post subject:  

OK - I'm off to uni now Smile
results.tar.gz
Description 
gz

 Download 
Filename  results.tar.gz 
Filesize  22.16 KB 
Downloaded  265 Time(s) 
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Tue 09 Oct 2007, 14:25    Post subject:  

Ok, now we know that Pfind search correct, but fails in the func 'build_treeitems'. The main code here are this:

Code:
#!/bin/bash
echo -e "\c" > /tmp/pfind-treeitems
for I in `cat /tmp/pfind-view | sed -e "s/ /{ð®Sđþ}/g"`; do
   TMP=`echo "$I" | sed -e "s/{ð®Sđþ}/ /g"`
   find "$TMP" -maxdepth 0 -printf "%p|%s|%CY/%Cm/%Cd - %CT|%M|%u\n" >> /tmp/pfind-treeitems
done


If you could:
1. Make the search.
2. Rename '/tmp/pfind-view$PROGPID' to '/tmp/pfind-view'.
3. Run this code.
4. check '/tmp/pfind-treeitems'

.....If everything is now ok.....Wow, I have no idea??????

.....If still the same failure..... Please try to tweak the code to see if you can pass the failure. The {ð®Sđþ} is just instead of ' ' (space) to get the for-loop to run filenames with spaces. Maybe find -printf "%...." needs a refreshment.

I'm curious Wink

Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Wed 10 Oct 2007, 05:45    Post subject:  

That works (I mean the contents of that file are correct) - which means you have no idea about why that file is being truncated Sad
But we also still don't know why the actions in the list menu aren't working for me (read what I said about the txt search on my linux partition).

Oh - and I just checked that the actions on search don't work either.
And the funny thing I just discovered is if I do a search for music files on hdb6, it only finds 24 of those mp3s - but I thought it just checked the extension, so it should find 269...

Am I really the only person having problems with 2.5? What could it be? Could my locale (nz) affect it somehow?

---------
I just checked by replacing the truncated tree-items file with the one generated from your instructions, and confirmed that the behaviour of pfind reopening when closed after a "show only" button press definitely occurs (only) when the tree-items file is truncated.
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Wed 10 Oct 2007, 10:41    Post subject:  

If I understand you right, it all seems to work with the given code.

In file /usr/local/pfind/func you'll find this section:
Code:
-build_treeitems)
   echo -e "\c" > /tmp/pfind-treeitems$PROGPID
   if [ `cat /tmp/pfind-view$PROGPID | wc -l` -lt $MAX_LIST_ITEMS ]; then #define how many items allowed in hitlist
      for I in `cat /tmp/pfind-view$PROGPID | sed -e "s/ /{ð®Sđþ}/g"`; do
         TMP=`echo "$I" | sed -e "s/{ð®Sđþ}/ /g"`
         find "$TMP" -maxdepth 0 -printf "%p|%s|%CY/%Cm/%Cd - %CT|%M|%u\n" >> /tmp/pfind-treeitems$PROGPID
      done
      if [ "$ACCEPT_ARROW" = "false" ]; then #filenames with < or > corrupts <tree> when not UTF-8
         #check filenames for < and >
         TMP=`cat /tmp/pfind-view$PROGPID | grep "<"`
         TMP2=`cat /tmp/pfind-view$PROGPID | grep ">"`
         if [ "$TMP" ] || [ "$TMP2" ]; then
            FRAME="Info"; IMG="dialog-info"; TXT1="Search result contains file(s) with < or > in name. As long as all fileames uses charset UTF-8 there is no risk, and you can edit config file to allow these chars. If filenames uses other charset than UTF-8 Pfind will fail. Pfind will now translate < and > to ?"
         . "$PROGPATH"box_ok
         fi
         cat /tmp/pfind-treeitems$PROGPID | sed -e 's/</?/g' | sed -e 's/>/?/g' > /tmp/pfind-treeitems$PROGPID
      fi
   else
       echo "Not allowed to view more than $MAX_LIST_ITEMS items.|Edit config file." >> /tmp/pfind-treeitems$PROGPID
   fi
;;

The working code was taken from here. Play with it...
Try to hash lines to see if you can find the breaking point.

Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Wed 10 Oct 2007, 18:59    Post subject:  

No, that code produces a correct pfind-treeitems file, but the actions in the list menu still don't work. I think this is an separate problem, as the actions in the list menu never work, but the tree-items file is only truncated on some searches.

I'll have a go at playing around with it to figure out how to prevent the truncated file, but I might not find time for a while Sad
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Sat 20 Oct 2007, 02:27    Post subject:  

I have now upgraded to Puppy 3.0.1 and got the same problem, so I guess I'll be forced to do something about it. Smile
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Sat 20 Oct 2007, 04:08    Post subject:  

Fixed. See main post.
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Sat 20 Oct 2007, 18:28    Post subject:  

Great - that's much better. I was just trying to muster the enthusiasm to look at it properly Smile

I'm afraid I've found another couple of bugs now though.
1. the "view in imagebrowser" list action, and the matching button, starts up gtksee, which loads everything and then crashes with a segmentation fault. Have you changed anything about the way the links are created or anything?

2. the search actions "open in text editor", "export list to text editor", and "view in imagebrowser" don't work - it starts searching and then suddenly stops and brings back the advanced search window.

I've only checked this up to Puppy 2.16.

BTW I still needed to manually set the permissions on /usr/local/bin/pfind.
Back to top
View user's profile Send private message 
richard.a


Joined: 15 Aug 2006
Posts: 510
Location: Adelaide, South Australia

PostPosted: Sat 20 Oct 2007, 18:47    Post subject:  

Been using the existing dotpup I've had for a while with my rebuild of 2.10pro and 2.02r2 to save putting extra stuff into the distribution.

Work really well. Thank you Smile

Richard

_________________
Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?


Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Sun 21 Oct 2007, 08:25    Post subject:  

richard.a
Nice to hear you find it useful

disciple
You must be the official Pfind-agent. Very Happy
Thanks a lot!!!!!

1. I try "view in imagebrowser" and it all seems ok, until I click on a *.png in GtkSee. Other filetypes works ok ?????? I use Puppy 3.01, and I'll place this in the todolist.

2. Not working search actions will be fixed.

Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Sun 21 Oct 2007, 08:53    Post subject:  

Edit:

It seems that GtkSee crashes when path says /initrd/mnt/dev_save and file extension is png
BUT NOT ALWAYS ????

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Sun 21 Oct 2007, 16:15    Post subject:  

It crashes with just .jpg files for me. Must be something different about the older puppies.

I'm not sure if I tried it in the last version or two - do you know if you changed anything recently that might affect it working with gtksee?
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Mon 22 Oct 2007, 13:04    Post subject:  

It's seems that the problem is the length of filename. Pfind adds the total path to the end of the name of the symlink. When it is longer than 80 chars (or something like this) it crashes.

Is it the same for you?

Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 8 of 40 [599 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, ..., 38, 39, 40 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
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.0906s ][ Queries: 12 (0.0084s) ][ GZIP on ]