You are not logged in.

#1 2017-02-24 22:44:39

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

[SOLVED] Lost script.

It was quite complex and I'd really like it back.

I don't remember where I put it. I don't think it's lost, but I have my little projects all over the place, tucked away in various subfolders across 3 partitions, with symlinks...

I put grep to sniff it out, but it's been running for over an hour, and at some point it just seeems to hang there, not sure if I should wait.

It throws lots of errors about some icon theme symlinks not found:
"grep: .icons/evolvere-black-folders-dark-light-fallback/apps/64/QtProject-designer.svg: No such file or directory"

but no results.

The problem is that I don't remember the name of the script.
but i used it to transcode large numbers of music files, so i know it contains "ffmpeg":

grep -RI ffmpeg > results

and in another terminal

tail -f results

that one just stays empty.
after canceling out of grep and tail, the file is zero size.

I don't think this is going anywhwere, it's been hanging again for half an hour now, not eating any resources.
meaning: at first i can see in my conky how grep is taking all the disk i/o and some cpu, and lots of the above mentioned errors/warnings, then at some point it just hangs. i don't get my prompt back, but the script doesn't seem to be doing anything.
maybe i have a link to /dev/null somewhere???

any ideas?
what to do?
other tools that can search file contents?
how to avoid in the future?
how do you take care of your data/scripts/projects?

Last edited by ohnonot (2017-02-25 17:17:19)

Offline

#2 2017-02-24 22:51:24

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] Lost script.

how do you take care of your data/scripts/projects?

Dropbox for archiving, github for WIP and Releases.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2017-02-24 23:19:02

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: [SOLVED] Lost script.

^I'm just wondering - without having tested these sites - is github to prefer to gitlab? At first glance have sympathies for gitlab, but people use mostly github.

Does Recoll work for files like that? The only disadvantage is that it requires quite a lot of time to generate the indexes... (at least if the hdd is big enough).

Offline

#4 2017-02-24 23:40:24

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] Lost script.

Find all files in and below current directory containing "ffmpeg":

find .  | xargs grep "ffmpeg"

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2017-02-25 02:26:24

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [SOLVED] Lost script.

^ who knows, maybe that would have worked.

turns out grep was indeed choking on some (broken?) symlinks.

the -R option means recursive + follow symlinks, the -r option means recursive + no symlinks.
so i tried again

grep -rI ffmpeg 2>/dev/null

and was seeing results (and drop the errors).

however, it did not help.
the file was hidden in plain sight in my ~/bin directory and no programmatic method could've helped me see it.
it was named almost identically with a whole bunch of transcoding miniscripts... a pebkac if ever there was one.

remains an exasperation about what a mess of documents, media, miniscripts, dotfiles and actual github repos i have here.

i really have to get a grasp on it one of these days, maybe you have some more input.

i don't like throwing all my dotfiles and half-arsed miniscripts onto github/lab, but i've realized that git can also be used locally, so there's a thought.

Offline

#6 2017-02-25 02:32:28

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,654
Website

Re: [SOLVED] Lost script.

Any idea what the file name might be?
Picking up damo's suggestion:

find . -iname '*vagueidea*'
#or
find . -iregex 'some_loose_regular_expression'

And, instead of trying to plough a whole partition, grep or find just certain subdirectories. And check out grep & find's options about whether or not to follow symlinks.

Last edited by johnraff (2017-02-25 02:34:32)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#7 2017-02-25 04:27:06

geekosupremo
Member
Registered: 2016-04-27
Posts: 169

Re: [SOLVED] Lost script.

martix wrote:

^I'm just wondering - without having tested these sites - is github to prefer to gitlab? At first glance have sympathies for gitlab, but people use mostly github.

If you're keen on version control but find Git(any) to be more than you'd like, there is also the rather excellent Fossil project. It is source control from the same mind that brought us SQLite.

Offline

#8 2017-02-25 17:16:56

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [SOLVED] Lost script.

@johnraff:
i found it already:

ohnonot wrote:

the file was hidden in plain sight in my ~/bin directory and no programmatic method could've helped me see it.
it was named almost identically with a whole bunch of transcoding miniscripts... a pebkac if ever there was one.

Offline

#9 2017-02-26 10:03:13

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: [SOLVED] Lost script.

martix wrote:

^I'm just wondering - without having tested these sites - is github to prefer to gitlab? At first glance have sympathies for gitlab, but people use mostly github.

Gitlab has free private repositories. Github has bunch of features, like jekyll pages and it is faster for me.

Last edited by brontosaurusrex (2017-02-26 10:05:42)

Offline

#10 2017-02-26 12:54:32

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: [SOLVED] Lost script.

There is an informative wiki site for code hosting. Just because it's more open source (client side code), I guess I'd prefer GitLab, but GitHub offers surely more community experience (as I just read, it hosts muuuch more code).

I'm not sure, but could this be something for issues like in the OP: https://zealdocs.org/   Just saw it in an other post...

Offline

#11 2017-02-27 20:21:51

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [SOLVED] Lost script.

martix wrote:

I'm not sure, but could this be something for issues like in the OP: https://zealdocs.org/   Just saw it in an other post...

that looks very interesting. from "Usage":

You can limit search results to a specific (or a set of specific) docsets.

The docset filter and the search query are delimited by a colon character (:).

Examples:

    string will search all docsets for string
    python:string will search only docsets related to Python for string

that sounds like exactly what i'd've needed in post #1!

Offline

#12 2017-03-31 00:50:28

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,028

Re: [SOLVED] Lost script.

I use these:

# 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'

Some results from: ftxt ffmpeg /media/5


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

Board footer

Powered by FluxBB