Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

READ-ONLY-MODE: PLEASE DO NOT POST NEW STUFF!
  New Forum: http://forum.puppylinux.com
 
 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 Wed 12 Aug 2020, 12:24
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
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 6 of 13 [184 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, ..., 11, 12, 13 Next
Author Message
musher0

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

PostPosted: Thu 19 Feb 2015, 06:44    Post subject:  

Ha-ha again, Puppus.

I think that I've been using a different animal :
Quote:
Secure Locate 3.1 - Released March 7, 2006
Copyright (c) 2005 Kevin Lindsay

Search: slocate [-qi] [-d <path>] [--database=<path1:path2:...>]
<search string>
slocate [-r <regexp>] [--regexp=<regexp>]
Update database: slocate [-qv] [-o <file>] [--output=<file>]
slocate [-e <dir1,dir2,...>] [-f <fs_type1,...> ] [-l <level>]
[-c <file>] <[-U <path>] [-u]>
General: slocate [-Vh] [--version] [--help]

Options:
-u - Create slocate database starting at path /.
-U <dir> - Create slocate database starting at path <dir>.
-c <file> - Parse original GNU Locate's configuration file
when using the -u or -U options. If 'updatedb' is
symbolically linked to the 'slocate' binary, the
original configuration file '/etc/updatedb.conf' will
automatically be used.
-e <dir1,dir2,...> - Exclude directories from the slocate database when
using the -u or -U options.
-f <fs_type1,...> - Exclude file system types from the slocate database
when using the -u or -U options. (ie. NFS, etc).
-l <level> - Security level.
0 turns security checks off. This will make
searchs faster.
1 turns security checks on. This is the default.
-q - Quiet mode. Error messages are suppressed.
-n <num> - Limit the amount of results shown to <num>.
-i - Does a case insensitive search.
-r <regexp>
--regexp=<regexp> - Search the database using a basic POSIX regular
expression.
-o <file>
--output=<file> - Specifies the database to create.
-d <path>
--database=<path> - Specfies the path of databases to search in.
-h
--help - Display this help.
-v
--verbose - Verbose mode. Display files when creating database.
-V
--version - Display version.

Author: Kevin Lindsay
Bugs: slocate@trakker.ca
HTTP: http://slocate.trakker.ca/



Many thanks. (EDIT: sentence removed.)
Now to hunt down your slocate...

BFN.

musher0

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Last edited by musher0 on Thu 19 Feb 2015, 06:52; edited 1 time in total
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Thu 19 Feb 2015, 06:47    Post subject:  

@Puppus, and also Smokey01.

It says "incremental" on the GNU slocate man page, DESCRIPTION section, 2nd line,
1st word. That sure explains the speed of updates.

BFN.

musher0

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Last edited by musher0 on Fri 20 Feb 2015, 11:02; edited 1 time in total
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Thu 19 Feb 2015, 06:57    Post subject:  

Tempting... Smile

http://rlocate.sourceforge.net/
https://fedorahosted.org/mlocate/

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Thu 19 Feb 2015, 16:49    Post subject:  

Moved to: http://www.murga-linux.com/puppy/viewtopic.php?p=830109&sort=lastpost#830109
_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Last edited by musher0 on Sun 22 Feb 2015, 20:28; edited 2 times in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Thu 19 Feb 2015, 19:32    Post subject:  

musher0 wrote:
Ok, folks.

Drums rolling, curtains up... I give you: PuppyTerrier-01! Very Happy For you to test!
I think that, in this *pet, I've solved all the "spiney" points we've uncovered so far.

* First, my apologies to Smokeyp01, who doesn't get a GUI...

__ However we have ANSI colors, and IMO, there's basically no difference between
__ typing in a GUI and typing in a CLI window, since typing is typing, eh?

__ The allergenic CLI aspect (for some people) is, I believe, largely mitigated by
__ the use of *.desktop files. Two scripts will appear in your menu, one for
__ constructing/updating the db's and one for searching them.

* the external drive db's stay on the external drives, so there's minimal hit on the
__ internal Puppy size. Only the index of the Puppy internal files is stored internally.
__ This feature makes slocate available for all types of Puppy configurations, either
__ full, frugal or CD/DVD. I paid particular attention to this feature.

* the search script searches everything each time, the Puppy OS and the mounted
__ external drives.

* updating takes 2-3 seconds max on my rig (I have +/- 165 Mg's worth of files on
__ 8 partitions.)

* the automatic launch through Startup has been "niced", using Uten's hint and
__ K. Lindsay's (the author of slocate) own one-liner for "croning" slocate.

* Speaking of which, the original slocate config. and script in /etc have been
__ removed, we don't need them with Médor's script.

* As a bonus, Médor's RAM-refreshing line is included in the automatic update.
__ Just comment that line with a "#" if you don't want it or need it. But it's there,
__ I for one find it quite useful. Also...
__ More time intervals have been included in that script. You may want to test what
__ time interval is more convenient for you. (There's a how-to in the script.)

* I thank you all of course, for the fruitful ideas and exchanges you provided in this
__ thread. Thanks are obviously due to the author of slocate, Kevin Lindsay, and to
__ gcmartin, initiator of this thread; also to Slavvo67, Uten and Médor for their
__ respective hints and contributions. Thanks also to Puppus Dogfellow who gave me
__ the little push I needed when I was stumped.

So, please test the attached to your heart's content. Constructive feedback will be
most welcome and will make this little utility even better.

Enjoy!

musher0


cool, musher. works well and is very fast. is there a way to read the .db files as text or html, or a way to convert the databases to something a browser or text editor can read? could you add (something like) output to file.txt as a choice for each of the databases created?

thanks in advance.
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2820
Location: South Australia :-(

PostPosted: Thu 19 Feb 2015, 19:45    Post subject:  

musher0 wrote:

* First, my apologies to Smokeyp01, who doesn't get a GUI...

No apologies required. I live in the cli, many others don't though.
musher0 wrote:

* updating takes 2-3 seconds max on my rig (I have +/- 165 Mg's worth of files on
__ 8 partitions.)

I have a lot more files than that, TB in fact.
musher0 wrote:

* Speaking of which, the original slocate config. and script in /etc have been
__ removed, we don't need them with Médor's script.

It'a still looking for it though, see attached.
image-2.jpg
 Description   
 Filesize   53.03 KB
 Viewed   281 Time(s)

image-2.jpg


_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
smokey01


Joined: 30 Dec 2006
Posts: 2820
Location: South Australia :-(

PostPosted: Thu 19 Feb 2015, 20:02    Post subject:  

A few weird things happening. Notice the . on sdb2 and sdb3 path.

This is causing a failed db.

Also the search desktop file doesn't seem to do anything. Running the script from the cli works fine though.
image-3.jpg
 Description   
 Filesize   52.27 KB
 Viewed   282 Time(s)

image-3.jpg


_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
gcmartin

Joined: 14 Oct 2005
Posts: 6730
Location: Earth

PostPosted: Thu 19 Feb 2015, 21:02    Post subject:  


_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Thu 19 Feb 2015, 22:42    Post subject:  

Thanks for the tests, guys.

@Smokey01: thanks for pointing out the "weirdities". Will look into it.

BFN.

musher0

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Thu 19 Feb 2015, 23:21    Post subject:  

Moved to:
http://www.murga-linux.com/puppy/viewtopic.php?p=830107&sort=lastpost#830107

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Last edited by musher0 on Sun 22 Feb 2015, 20:26; edited 1 time in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Thu 19 Feb 2015, 23:37    Post subject:  

musher0 wrote:
Puppus Dogfellow wrote:
(...)
cool, musher. works well and is very fast. is there a way to read the .db files as text or
html, or a way to convert the databases to something a browser or text editor can
read? could you add (something like) output to file.txt as a choice for each of the
databases created?

thanks in advance.


Thanks, Puppus.

As to your request, best I can do is attached. (For you -- and others -- to test.
If you find it useful, I'll include it as an extra in the next version. Because the files ls
creates are large, and that the directories are not mentioned on each line, it shouldn't
become the main script IMO.)

I tried loading the slocate db's in a text editor, and it loads only the first byte.
You can read an slocate db using less, but it's meaningless, because only some (?)
filenames are visible, and they are separated by code (perhaps vars for the folders,
I really don,t know).

This attached script uses ls instead of slocate. The db files created are huge, by
comparison, but they can be read in any text editor, or in a browser.

Same principle, meaning: the db's are on the indexed drive.

I hope that helps.

BFN.

musher0
~~~~~~~~
PS. It's a variant of a script I uploaded previously on this thread..



thanks, i'll give it a try (or just use some of it--not sure if i need it done for every drive....)

fwiw, gnumeric was able to open the .db slocate created--it wasn't very readable (compared to what ls or even tree would give), but it did open.


___________

bug report on the slocate version of the indexing script: search from menu entry doesn't work (update does and the search works from the file itself).
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 6730
Location: Earth

PostPosted: Fri 20 Feb 2015, 00:08    Post subject: An earlier reference to "updatedb" command  

I just found something out which refers to what @Smokey01 alluded to, couple days back.

I just had enough time to begin a test for concept using FATDOG700-RC as there is several other tests I needed to run.

Seems; namely "updatedb" is being used as @Smokey01 was asking.

What FATDOG has in the current FATDOG700-RC, builtin, is this command. So, in a terminal without ANY LOCAL DRIVES mounted, I ran it for finding couple normal files usually in the ISO's booted filesystem. Since the command is present, results are expected; "locate filename-only" returns immediate results.

So, I mounted my local NTFS drive. Opened it in ROX, and issued a terminal command to find one of its files. Needless to say "it failed to find it".

Now, here's where what @Smokey01's comments comes into view. I re-ran the "updatedb" command. And guess what happened. Firstly, it took noticeably longer and just when I was about to clobber it, it completed. Next, I re-opened the drive in ROX, selected a file which is NOT in the FATDOG filesystem and only exist on the drive to be the target for the locate command.

I got an immediate response! FATDOG has addressed this need but has done it totally using Linux's updatedb/locate commands.

THIS DOES NOT invalidate what has been achieved as it was clear to me when @Musher0 stated his objectives in database space management to move the db out of RAM to the actual device level. FATDOG's approach shares that there is an operational 2nd solution available, as well.

How that would be extracted and added to WOOFCE, is beyond me, but, it appears that FATDOG (and Lighthouse) have this solution present in their arsenal for user needs. And, since @BarryK is now entrenched in his combination T2 and WOOFQ, this is all too easy for him as well.

I will project the three alternatives in the opening post for developers to locate posts of the work done by members in this thread.

Thanks EVERYONE! It now rests in the hands of the WOOFers for all future PUPs. You have made clear the problem, the benefit and addressed it with solutions that can be available to all PUPs in the future.

Edit: corrected a misspelling and added clarity in one paragraph's sentence.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile

Last edited by gcmartin on Fri 20 Feb 2015, 03:01; edited 1 time in total
Back to top
View user's profile Send private message 
musher0

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

PostPosted: Fri 20 Feb 2015, 01:43    Post subject:  

Hello, folks.

Here's PuppyTerrier-01b. All corrections from testing above have been
incorporated.

* Thanks in particular to Smokey01 for catching the need to restore a conf file in
/etc for slocate. Also the search from menu should work nicely.

* A *.txt version, as per Puppus' request, is now present as an extra.

* Menu names have been made clearer (thanks gcmartin, for the suggestion over PM)

The edited scripts seem to work well on my slacko-6.0b Puppy. But again, your
testing will be much appreciated.

BFN.

musher0

~~~~~~~
Edit, Febr. 21, 2015 -- Previous attachment deleted. Please see newer version at:
http://murga-linux.com/puppy/viewtopic.php?p=829853&sort=lastpost#829853
Thanks.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Last edited by musher0 on Sat 21 Feb 2015, 13:36; edited 1 time in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Fri 20 Feb 2015, 03:10    Post subject:  

musher0 wrote:
Hello, folks.

Here's PuppyTerrier-01b. All corrections from testing above have been
incorporated.

* Thanks in particular to Smokey01 for catching the need to restore a conf file in
/etc for slocate. Also the search from menu should work nicely.

* A *.txt version, as per Puppus' request, is now present as an extra.

* Menu names have been made clearer (thanks gcmartin, for the suggestion over PM)

The edited scripts seem to work well on my slacko-6.0b Puppy. But again, your
testing will be much appreciated.

BFN.

musher0


awesome. thanks, musher0.
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2820
Location: South Australia :-(

PostPosted: Fri 20 Feb 2015, 05:07    Post subject:  

musher0, I should have mentioned it before but your pet should include a couple more components just to make it easier to get it running.

1. place a 0 byte file called /var/lib/slocate/slocate.db in you main system. Without it it seems to bork and not create the slocate.db file. The other drives seem to have their db created, a bit odd.

2. Create a group for slocate when installing. You just need to append it to the existing group file in /etc/. It doesn't work without it. Try a fresh frugal install and you will see what I mean.

This is now a pretty good application and I don't even mind the db files being on their respective drives but you can't search them unless the drives are mounted. The script that searches all databases drives is clever but not so good if you have 20 drives and only one or two mounted.
For me and many others I'm sure this will be an issue. I still think it's more functional if one large database is used and stored on /mnt/home so it's always available. Yes, you still have to mount and index each drive but if you operate like me, most of the work is done on 3 or 4 drives which are changing regularly.

Working quite nicely.

Cheers

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 6 of 13 [184 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, ..., 11, 12, 13 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. 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.0774s ][ Queries: 13 (0.0180s) ][ GZIP on ]