You are not logged in.
Ever loose a file - you just can remember where it is where you saved it?
You know it had the words "young leopard" in it, but you forget the name, where it is and all that.
ftxt "young leopard" /media/5
14 May 17 @ 17:42:33 ~
$ ftxt "young leopard" /media/5
find text in files ie ftxt filepattern path
/media/5/Documents/Hunting-Dog.txt
16:Hearing this, the young leopard halts his attack in mid-strike, a look of
28:The young leopard is furious at being made a fool of and says, 'Here, monkey,
From my bash alias file:
# find text in files ie: ftxt filepattern /path
# ack-grep - grep-like text finder
# ack-grep [options] PATTERN [FILE...]
# ack-grep -f [options] [DIRECTORY...]
alias ftxt='echo "find text in files ie ftxt filepattern path" && ack-grep'
alias sftxt='echo "ROOT find text in files ie ftxt filepattern path" && sudo ack-grep'
What? You want to read it now? OK
Subject: Hunting Dog
A wealthy old Gentleman decides to go on a hunting safari in Africa, taking
his faithful, elderly Jack Russell named Killer, along for the company.One day the old Jack Russell starts chasing rabbits and before long, discovers
that he's lost. Wandering about, he notices a leopard heading rapidly in his
direction with the intention of having lunch.The old Jack Russell thinks, 'Oh, oh! I'm in deep doo-doo now!' Noticing some
bones on the ground close by, he immediately settles down to chew on the bones
with his back to the approaching cat. Just as the leopard is about to leap,
the old Jack Russell exclaims loudly, 'Boy, that was one delicious leopard! I
wonder if there are any more around here?'Hearing this, the young leopard halts his attack in mid-strike, a look of
terror comes over him and he slinks away into the trees. 'Whew!', says the
leopard, 'That was close! That old Jack Russell nearly had me!'Meanwhile, a monkey who had been watching the whole scene from a nearby tree,
figures he can put this knowledge to good use and trade it for protection from
the leopard So off he goes, but the old Jack Russell sees him heading after
the leopard with great speed, and figures that something must be up.The monkey soon catches up with the leopard, spills the beans and strikes a
deal for himself with the leopard.The young leopard is furious at being made a fool of and says, 'Here, monkey,
hop on my back and see what's going to happen to that conniving canine!Now, the old Jack Russell sees the leopard coming with the monkey on his back
and thinks, 'What am I going to do now?', but instead of running, the dog sits
down with his back to his attackers, pretending he hasn't seen them yet, and
just when they get close enough to hear, the old Jack Russell says...'Where's that damn monkey? I sent him off an hour ago to bring me another
leopard!Moral of this story.....
Don't mess with the old dogs...age and skill will
always overcome youth and treachery! BS and brilliance only
comes with age and experience.
Let's continue ...
Have you ever lost, misplaced or forgot where a file is. Now where is that file? I know it had the word 'dice' in the name and it was in one on my conky directories:
14 May 17 @ 17:45:13 ~
$ ff "*dice*" /media/5/Conky
/media/5/Conky/images/glass_android_icons/dice.png
/media/5/Conky/DiceClock/time-dice
/media/5/Conky/DiceClock/images/dice_and_dominoes_free_preview3.png
/media/5/Conky/DiceClock/dice-time-date.tar.gz
From my bash functions file:
# find a file
ff() {
find "$2" -name "$1"
}
sff() {
sudo find "$2" -name "$1"
}
Now if you forget where the file is and can't remember the name; you're euchred! ff doesn't read minds. YET!
OK, off to find that conky I wrote ....
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
why not just use 'grep -R ...'?
https://forums.bunsenlabs.org/viewtopic … 967#p45967
Offline
i use locate
Offline
Offline
i use locate
I use to but it only finds "files" in the current partition - not text in files:
16 May 17 @ 10:03:38 ~
$ locate dice
/home/sector11/.config/conky/DiceClock/time-dice
/home/sector11/.config/conky/DiceClock/time-dice/0-0-1.png
/home/sector11/.config/conky/DiceClock/time-dice/0-0-2.png
/home/sector11/.config/conky/DiceClock/time-dice/1-0-1.png
/home/sector11/.config/conky/DiceClock/time-dice/1-0-2.png
/home/sector11/.config/conky/DiceClock/time-dice/1-1-1.png
/home/sector11/.config/conky/DiceClock/time-dice/1-1-2.png
/home/sector11/.config/conky/DiceClock/time-dice/2-0-1.png
/home/sector11/.config/conky/DiceClock/time-dice/2-0-2.png
/home/sector11/.config/conky/DiceClock/time-dice/3-0-1.png
/home/sector11/.config/conky/DiceClock/time-dice/3-0-2.png
/home/sector11/.config/conky/DiceClock/time-dice/4-0-1.png
/home/sector11/.config/conky/DiceClock/time-dice/4-0-2.png
/home/sector11/.config/conky/DiceClock/time-dice/5-0-1.png
/home/sector11/.config/conky/DiceClock/time-dice/5-0-2.png
/home/sector11/.config/conky/DiceClock/time-dice/6-0-1.png
/home/sector11/.config/conky/DiceClock/time-dice/6-0-2.png
/home/sector11/.config/conky/DiceClock/time-dice/6-1-1.png
/home/sector11/.config/conky/DiceClock/time-dice/6-1-2.png
/home/sector11/.config/conky/DiceClock/time-dice/6-2-1.png
/home/sector11/.config/conky/DiceClock/time-dice/6-2-2.png
/home/sector11/.config/conky/DiceClock/time-dice/6-3-1.png
/home/sector11/.config/conky/DiceClock/time-dice/6-3-2.png
/home/sector11/.config/conky/DiceClock/time-dice/6-4-1.png
/home/sector11/.config/conky/DiceClock/time-dice/6-4-2.png
/home/sector11/.config/conky/DiceClock/time-dice/6-5-1.png
/home/sector11/.config/conky/DiceClock/time-dice/6-5-2.png
/home/sector11/.config/conky/DiceClock/time-dice/6-6-1.png
/home/sector11/.config/conky/DiceClock/time-dice/6-6-2.png
/lib/modules/3.16.0-4-amd64/kernel/sound/firewire/snd-dice.ko
/usr/share/doc/NVIDIA_GLX-1.0/html/appendices.html
/usr/share/doc/groff-base/html/mom/appendices.html
/usr/share/keepassx/icons/dice.png
/usr/src/linux-headers-3.16.0-4-amd64/include/config/snd/dice.h
16 May 17 @ 10:03:45 ~
$
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
i use locate
locate only finds files that are in the locate database, not what is physically present on your disk.
also i don't think it can see text inside files.
I forgot all about that thread....
i think you should take a look at my usage of grep, it addresses some of the problems i'm seeing in your screenshots.
btw ack = nice find!
Offline
use grep
ector ~ $ grep "forecast" .conkyrc3
${image $HOME/1_accuweather/forecast_2016/forecast_0.png -p 23,435 -s 250x252}\
${image $HOME/1_accuweather/forecast_2016/forecast_1.png -p 10,715 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_2.png -p 236,715 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_3.png -p 10,785 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_4.png -p 240,785 -s 45x45}\
ector ~ $
Offline
Offline
Sector11 wrote:I forgot all about that thread....
i think you should take a look at my usage of grep, it addresses some of the problems i'm seeing in your screenshots.
btw ack = nice find!
What problems?
ack wasn't found by me it was a suggestion by someone. But my forgetter is getting better and I can't remember who. But it is nice!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
What problems?
symlinks.
Offline
A. @earlybird: before I dig into it, are any of this solutions easy to cron to just run/index overnight?
B. Is there a way to run ack in multiple threads, like parallel?
Last edited by brontosaurusrex (2017-05-19 07:01:07)
Offline
Sector11 wrote:What problems?
symlinks.
Please show an example.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
@earlybird, thanks.
Slightly related, on how to make as simple tree-index for your little web server (sort of a poor man search engine without any file indexing of course), and still stay php/cgi free.
p.s. And to answer my B. https://sift-tool.org/features < does look interesting. It's fast.
time sift Blender | wc && time ack Blender | wc
349 3495 41421
real 0m0.129s
user 0m0.164s
sys 0m0.136s
349 3495 42672
real 0m0.792s
user 0m0.760s
sys 0m0.032s
Last edited by brontosaurusrex (2017-05-19 17:26:12)
Offline
ohnonot wrote:Sector11 wrote:What problems?
symlinks.
Please show an example.
it's in your screenshot, lots of "file not found" errors.
i had the same problem and commented on it in my thread.
Offline
it's in your screenshot, lots of "file not found" errors.
i had the same problem and commented on it in my thread.
OHhhhhhhhhh yea ... just got yhr chance to check that ... woeks nice.
Thank you.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
But my forgetter is getting better and I can't remember who.
I had a professor in college who termed it having a senior moment. You, sir, are now in my Words for Thought database.
Last edited by KrunchTime (2017-05-25 06:57:22)
Offline
Please - credit: Linda Davis for that. May she rest in peace. Great lady.
She had two sayings, from the 90's, that I quote from her today - we were probably twins in another life:
My forgetter is getting better
- - Linda Davis
I don't make typos, the keys on my keyboard move around to confuse me.
- - Linda Davis
Like up there a couple of posts:
that ... woeks nice.
scheeeeech! "works nice" already.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline