pFind 6.3

Filemanagers, partitioning tools, etc.
Post Reply
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#106 Post by disciple »

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: Select all

/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: Select all

/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.
Attachments
txt1.gz
(1.87 KiB) Downloaded 576 times
pfind-treeitems1267.gz
(5.05 KiB) Downloaded 559 times
find.gz
(3.36 KiB) Downloaded 558 times

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#107 Post by zigbert »

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

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#108 Post by disciple »

OK - I'm off to uni now :)
Attachments
results.tar.gz
(22.16 KiB) Downloaded 474 times

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#109 Post by zigbert »

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

Code: Select all

#!/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

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#110 Post by disciple »

That works (I mean the contents of that file are correct) - which means you have no idea about why that file is being truncated :(
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.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#111 Post by zigbert »

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: Select all

-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

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#112 Post by disciple »

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 :(

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#113 Post by zigbert »

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. :)

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#114 Post by zigbert »

Fixed. See main post.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#115 Post by disciple »

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

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.

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#116 Post by richard.a »

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 :)

Richard
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#117 Post by zigbert »

richard.a
Nice to hear you find it useful

disciple
You must be the official Pfind-agent. :D
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

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#118 Post by zigbert »

Edit:

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

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#119 Post by disciple »

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?

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#120 Post by zigbert »

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

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#121 Post by disciple »

Ah - yes, that seems to be it, but I thought that was how you'd always done it.

------
Of COURSE!

I've just realised that the reason XnView doesn't work as the image browser is because your links don't have file extensions on the end of their names. If I add them manually, then it works fine.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#122 Post by zigbert »

but I thought that was how you'd always done it.
"But I thought the old lady dropped it into the ocean in the end" (couldn't help it :D )

I thought so too
Maybe it's time to rethink the filenaming.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

From another thread

#123 Post by disciple »

I have 2.6 running on puppy 3.01 and when the config file is changed to "search only current filesystem=true" it reverts back to "false" every time. This never happened in prior versions

Pfind is a great find tool which I use all the time because I can never remember where anything is in the filesystem. Wink

Great work and thanks
I haven't checked if it's the same for me.

http://www.murga-linux.com/puppy/postin ... ly&t=22906

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#124 Post by zigbert »

I have 2.6 running on puppy 3.01 and when the config file is changed to "search only current filesystem=true" it reverts back to "false" every time. This never happened in prior versions
In config file it should say:
CHKXDEV=true #search only current filesystem

Disciple
You say Xnview needs the extensions. I remember I tried Gqview once, and it wouldn't accept pfind output. Maybe this is the answer. I need to check this out since Barry includes Gqview in the upcoming Puppy.

Sigmund

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#125 Post by disciple »

Sorry, I gave the wrong link somehow :( They should be looking here now anyway. http://www.murga-linux.com/puppy/viewto ... 317#149317

Post Reply