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 26 Apr 2015, 20:16
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 1 of 11 [164 Posts]   Goto page: 1, 2, 3, ..., 9, 10, 11 Next
Author Message
gcmartin


Joined: 14 Oct 2005
Posts: 4914
Location: Earth

PostPosted: Fri 30 Jan 2015, 20:16    Post subject:  Normal Linux commands to Locate your system files, INSTANTLY
Subject description: Linux Commands missing from PUPPY Linux distros which should be returned
 

Commands which should be added back into the system's terminal commands: "updatedb" and "locatedb" or "slocate".

Linux commands whose benefits is explained here.

Over the years many of us have found our "find" command to be taking longer and longer. This is due to the very fact that more and more data is on our HDD/USB/SSD/etc storage media than ever before.

Many of us home users have music, family pictures, videos, documents, etc where our PUPs have been useful in our housing this content.

Its no wonder that locating data whose name and location we've forgot, is taking longer and longer.

Linux, for many years has addressed this, but, in PUPs beginnings, this was not considered.

Today, with so much data in the home we need every element of assistance to quickly find data, as is possible.

In this thread, there are 7 individual solutions which allows the PUP user to locate any files of theirs, instantly. Several of these are related, either directly or indirectly. None of these exist today in any 32bit PUPs but is available in a few 64bit PUPs. As you navigate thru this thread, pay attention, in reverse alphabetic order, to:This is a formal request asking developers of WOOFCE/WOOFQ/WOOF/etc, the PUP builder systems, to please consider add slocate or updatedb-locatedb-locate so that these can benefit users in finding files quickly in their PUP systems. These commands are not new to Linux, rather, they have been overlooked in Puppy Linux.

The members, in this thread, have certified the benefit to its use, have participated providing feedback in their findings, and have develop extended solutions of command-use facilitating file searches.


PUPPY WOOFCE & WOOFQ developer consideration requested.

_________________
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 Engine or use DogPile

Last edited by gcmartin on Mon 02 Mar 2015, 16:31; edited 12 times in total
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 4821
Location: World_Hub

PostPosted: Fri 30 Jan 2015, 21:25    Post subject:    

What's the problem? This old dog works fine.

Aside from adding /usr/var/mlocate, /etc/group should list "mlocate:x:1001:" after the addgroup bit.
Code:
$ locate -V
mlocate 0.24
Copyright (C) 2007 Red Hat, Inc. All rights reserved.
This software is distributed under the GPL v.2.

The binary's about 30k. The db file depends on your systems root size.

Mine @ 1.3+ gigs registers about 5.2mbs.. Not bad considering..

And Oh Boy.. >> *Lightning* Fast!
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Fri 06 Feb 2015, 20:26    Post subject:  

Hi, Semme

... except "this old package" aborts because it can't find its stuff...

Back to the workbench, I suppose...

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
musher0


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

PostPosted: Fri 06 Feb 2015, 22:24    Post subject:  

Hello, World!

(Continued from previous post)

... On the other hand, slocate works great on my slacko-6.0b! slocate is a "cousin"
of mlocate and locate, and serves the same purpose.

http://pkgs.org/slackware-14.1/slackware-i486/slocate-3.1-i486-4.txz.html
(description)

http://slackware.cs.utah.edu/pub/slackware/slackware-14.1/slackware/a/slocate-3.1-i486-4.txz
(download)

I unpacked and installed the above, and it ran "out of the box".

Once installed, the first (and essential) thing for you to do is to create its database
with the following command:
Code:
slocate -e "/proc,/dev/,/tmp" -l0 -u


This will
    * create the files database,
    * excluding anything in folders /proc, /dev and /tmp;
    * make it available for all users (-l0 parameter; we don't need to specify
    __ security levels for users, since a Puppy user always runs as "root");
    * The -u parm is for updating, but at fist run, it means "create".

That's it. You're ready to go.

If needed, I'll create a separate package for older Lucid, etc., Pups, But this slocate
is far from new, so the glibc version of the Puppy should have no effect, it shouldn't
be an hindrance for running this CLI program. Don't hesitate to let me know.

Attached is the slocate README as reference.

~~~~~~~~
One peculiarity of slocate, as I understand it, is that is does the job of locate and
updatedb. It has no need for those utilities, although they are sym-linked to slocate
in this slackware package.
~~~~~~~~

How-to.
This little guy slocate packs quite a punch, so most of the time, you'll want to
pipe it to grep. Have a look at this picture, starting backwards:



Let's take geany, for example. Now on my Pup, I've installed the geany plug-ins, so
there are lots of files with "geany" in their filename.

If I want to search for the executable only, issuing the command
Code:
slocate geany

is a waste of time. I get over a thousand lines.

I can start with filtering out anything present in the /initrd folder. Now that's better,
only 300 something results.

So I continue and now I "filter in" any "geany" line with "/bin" in it. And here we
go: 3 results. We're home ! Smile
~~~~~~~~~~~~

I must say that I'm impressed by the speed of this little utility, after all the waiting
often associated with working with pfind (but pfind is still a must, no doubt about
it!)

It goes without saying: many thanks to gcmartin for "putting a question mark over
my head" ! Wink And I agree with him: given its very small size, -- vs its usefulness --,
slocate should be included in each and every Puppy.

I hope that this slocate tool will help you find your files faster on your Puppy.

BFN.

musher0
slocate_README.zip
Description 
zip

 Download 
Filename  slocate_README.zip 
Filesize  2.36 KB 
Downloaded  83 Time(s) 

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
nic007

Joined: 13 Nov 2011
Posts: 1005

PostPosted: Sat 07 Feb 2015, 01:08    Post subject:  

Does Linux have anything as good as the programme, "Everything", which I use with Windows. That's finding files in real-time. Excellent and a must have.
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2245

PostPosted: Sat 07 Feb 2015, 01:46    Post subject:  

nic007 wrote:
Does Linux have anything as good as the programme, "Everything", which I use with Windows. That's finding files in real-time. Excellent and a must have.

Try Recoll from the repos.
Is a big big for puppy standards as it rewires both python and webkit but is probably the best of what is currently available in linux.

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Sat 07 Feb 2015, 04:31    Post subject:  

Hello, all.

Just a note: it would be unfair not to mention that by default, Puppy already has
three "file detectives" in command line mode: find, whereis and which.

You can "man" all three to learn in detail what they do, but in a nutshell:
    * find is slow at first search, but you can give it very elaborate parameters:
    e.g. find a certain executable or document or db or whatever, in a certain folder,
    starting at a certain mount point, and then launch it with executable X, Y or Z,
    this way, but not that way,

    * whereis will report anything that has to do with an executable under /usr
    You can type < whereis geany > and you'll get all folders under /usr where the
    name geany appears. Useful to locate a man file, a jpg, a script, etc. related to
    the executable.

    * which is the quickest, no-nonsense, to-the-point guy in this CLI team.
    It only finds executables. Type < which geany >, and which answers :
    /usr/bin/geany. Period.

    However simple, this can be used to advantage. An untold use of which is as a
    shortcut to launch an executable which you don't know for sure exists in your
    Puppy, by typing it surrounded by tics, like so: < `which geany` >. which will
    check if geany exists, and the tics will launch the executable when found.
    If no executable, no launch.

    The above form is much shorter and quicker than typing
    < [ -e /usr/bin/geany ] && /usr/bin/geany >
    and it does exactly the same thing
    .

In answer to mavrothal and nic007, may I suggest that some talented Puppyist
get to work on some gtk-dialog form for slocate, like the one zigbert wrote
for find/pfind?

Don't ask me. I'm horrible at XML, the stuff actually gives me allergies! I get
goose bumps just thinking about it. Brrr. Shocked Rolling Eyes Surprised However...
I'll gladly use it once done! Smile

Bye for now.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Jasper


Joined: 25 Apr 2010
Posts: 1267
Location: England

PostPosted: Sat 07 Feb 2015, 05:39    Post subject:  

Hi musher0.

Thank you very much for improving my education with:

whereis
which
'which'

My personal favourite is <which>.

As regards your <'which geany'> example, merely typing <geany> in my urxvt terminal will launch geany (as last used) - though perhaps all tests are not so simple.

Using gRun [see screen shot] typing <gea> is sufficient to choose "geany" prior to clicking OK. To test, type <grun> then <gea>.

My regards
gRun.png
 Description   
 Filesize   9.94 KB
 Viewed   659 Time(s)

gRun.png

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


Joined: 23 Nov 2006
Posts: 10224

PostPosted: Sat 07 Feb 2015, 06:03    Post subject:  

If you don't want databases lying around and you like guis then searchmonkey I found to be as fast as anything I tried unless you go to gtk1 land .... content search and regular expressions too... invaluable for compiling I find to look for those 'lost' functions.

No bias...I did not write it...just tidied up the interface because I liked it Smile

Indeed I turn off those indexing daemons in windows as they are a drag...and after all I am looking for stuff in unknown places like kernel sources, devx and app sources...NON of which would be in a recent database..... seems odd to search for stuff you already know about...but thats just me.

Mike
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Sat 07 Feb 2015, 08:46    Post subject:  

Jasper wrote:
Hi musher0.

Thank you very much for improving my education with:

whereis
which
'which'

My personal favourite is <which>.

As regards your <'which geany'> example, merely typing <geany> in my urxvt terminal will launch geany (as last used) - though perhaps all tests are not so simple.

Using gRun [see screen shot] typing <gea> is sufficient to choose "geany" prior to clicking OK. To test, type <grun> then <gea>.

My regards


Hi, jasper.

I agree. The form < `which geany` > would only used to replace the longer line I
mentioned. It would be used typically by a developer in the context of a bash script,
NOT by a user who simply wants to launch his program.

You wouldn't use the < `which geany` > form in a launcher such as grun or gexec.

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
musher0


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

PostPosted: Sat 07 Feb 2015, 08:52    Post subject:  

mikeb wrote:
If you don't want databases lying around and you like guis then searchmonkey I found to be as fast as anything I tried unless you go to gtk1 land .... content search and regular expressions too... invaluable for compiling I find to look for those 'lost' functions.

No bias...I did not write it...just tidied up the interface because I liked it Smile

Indeed I turn off those indexing daemons in windows as they are a drag...and after all I am looking for stuff in unknown places like kernel sources, devx and app sources...NON of which would be in a recent database..... seems odd to search for stuff you already know about...but thats just me.

Mike


Hi, mike.

So you brushed up searchmonkey's interface for Puppy, eh? Smile

As to db's, slocate takes a very long second to build its own... And it updates once
a day, not every minute.

In Linux, we're fast and intelligent, remember?! (A luxury under WhineDose...) Smile

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 10224

PostPosted: Sat 07 Feb 2015, 09:00    Post subject:  

Quote:
So you brushed up searchmonkey's interface for Puppy, eh?

no for me Very Happy ...puppy (and anyone else) just happens to get the benefit Smile
http://www.murga-linux.com/puppy/viewtopic.php?search_id=253253357&t=90257

My windows is fast ...but yet I am not intelligent.... hmmm
I use linux for interest not need.... Wink

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


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

PostPosted: Sat 07 Feb 2015, 09:10    Post subject:  

You're too modest! Smile
_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
gcmartin


Joined: 14 Oct 2005
Posts: 4914
Location: Earth

PostPosted: Sat 07 Feb 2015, 13:29    Post subject:  

So we have 2 ideal command level approaches for immediate response to the location of any file search from the linux command-line.
  • The older updatedb (done once a day, say) and its companion locatedb (locate)
  • OR slocate which uses switches to accomplish what is done by the above commands
Considering the vast amounts of files any given system has today, we should ask developers to consider returning these Linux commands back into newly released versions of PUPs. This single addition provides great merit to all whether doing command line searches (where answers are returned immediately) or in script speed increases that chase filesystem for locations of elements (now there is now wait when such is perform).

Thus, any new WOOFCE/WOOFQ/other PUP builders such that everyone has this benefit built in. The benefit is enormous, the penalty (called a "db", herein this thread) is too insignificant to consider as having any negligible impact on the system's download size (ISO/IMG).

Can we appeal again for PUP builder's considerations to benefit....
Edited: Boolean change

_________________
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 Engine or use DogPile

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


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

PostPosted: Sat 07 Feb 2015, 14:01    Post subject:  

@gcmartin
How do we get a petition going? Smile

-- Afterthought --
gc,

If I may, the AND in your post above should be an OR: both applications do the same
thing, it's the same approach. The difference between the two is that slocate appears
to be more compact, relying only on itself plus two symlinks (not full applications),

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 11 [164 Posts]   Goto page: 1, 2, 3, ..., 9, 10, 11 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.1169s ][ Queries: 12 (0.0085s) ][ GZIP on ]