Results 1 to 10 of 10

Thread: problem with grep/find works before - after update - problem

  1. #1
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    problem with grep/find works before - after update - problem

    hi
    i think that's a tread for the devolpment. i don't no why. my problem is that is was this command 100 of times and it still works like it's defined.
    but i run it again (got about - i think 3 updates in the last 4 days). now when i run this command in my home directory "~" i always get the ouput:
    grep: Ungültige Option -- »�«
    Aufruf: grep [OPTION]… MUSTER [DATEI]…
    Rufen Sie »grep --help« auf, um weitere Informationen zu erhalten.
    i try to translate it: grep: unknow option (that's a lie)
    --> look at the uptput !
    i now how to call grep and let us bet it's a mo****** about your .gfs (by the side this hassle me in some more situations)
    the command i showned works in every directory - without my home ( help.
    oh yes - i tryed to run the command as super-user --> id -a gives me when i run " su -": uid=0(root) gid=0(root) Gruppen=0(root)
    when i run "sudo /bin/bash": -->uid=0(root) gid=0(root) Gruppen=0(root) (the same)
    this is a big problem for me - i am no "mouse freak" - please think about your implemention of your fu*** .gfs. when the problem is
    between my ears (what i don't belive) give me an anserwer please.
    grep -inH 'find_anithing' `find . -type f`
    running with id: uid=0(root) gid=0(root) Gruppen=0(root)
    : find: "./.gvfs": Keine Berechtigung -> no permission ???
    grep: Ungültige Option -- »�«
    Aufruf: grep [OPTION]… MUSTER [DATEI]…
    Rufen Sie »grep --help« auf, um weitere Informationen zu erhalten.
    as a hint: i think the problem is in the commands - but i cant't find the return-code why.
    cheers
    Last edited by rnerwein; February 8th, 2013 at 01:15 PM. Reason: sorry - hit return
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  2. #2
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: problem with grep/find works before - after update - problem

    Please care to elaborate with some examples of what is wrong.
    Last edited by schragge; February 8th, 2013 at 01:01 PM.

  3. #3
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: problem with grep/find works before - after update - problem

    Quote Originally Posted by schragge View Post
    Please care to elaborate with some examples of what is wrong.
    hi guy
    that's a nice answer: Please care to elaborate with some examples of what is wrong.
    but i think i am to stupid to understand what you mean with your post. that's not a example it is reality.
    cheers
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  4. #4
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: problem with grep/find works before - after update - problem

    Quote Originally Posted by rnerwein View Post
    grep -inH 'find_anithing' `find . -type f`
    Easy, man (or should I say "sachte" ?). Look at the time of my post then you understand what I meant. Anyway, what
    Code:
    grep -inHr -e 'find_anything' .
    gives you? I suppose it's not grep's fault. Something in the output of find makes grep think it's an option, and not a file name. I think that you have a file somewhere in your home directory named, say Grönemeyer -Ö.mp3, i.e. having a space-dash sequence in its name. Try
    Code:
    grep -inH -e 'find_anything' -- `find . type f`
    To find the "offending" file, try
    Code:
    find -name '* -*'
    By the way, invoking find from grep's command line as you did can give weird results if you have some files with unusual characters in their names. Better use either
    Code:
    find some/dir -type f -print0 | xargs -0 grep -inHe 'find_anything' --
    or
    Code:
    find some/dir -type f -exec grep -inHe 'find_anything' -- {} +
    Alternatively, you can invoke grep with the -r option as I did above. It's a GNU extension.
    Last edited by schragge; March 25th, 2013 at 12:11 AM.

  5. #5
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: problem with grep/find works before - after update - problem

    Quote Originally Posted by schragge View Post
    Easy, man (or should I say "sachte" ?). Look at the time of my post then you understand what I meant. Anyway, what
    Code:
    grep -inHr -e 'find_anything' .
    gives you? I suppose it's not grep's fault. Something in the output of find makes grep think it's an option, and not a file name. I think that you have a file somewhere in your home directory named, say Grönemeyer -Ö.mp3, i.e. having a space-dash sequence in its name. Try
    Code:
    grep -inH -e 'find_anything' -- `find . type f`
    To find the "offending" file, try
    Code:
    find -name '* -*'
    By the way, invoking find from grep's command line as you did can give weird results if you have some files with unusual characters in their names. Better use either
    Code:
    find some/dir -type f -print0 | xargs -0 grep -inHe 'find_anything' --
    or
    Code:
    find some/dir -type f -exec grep -inHe 'find_anything' -- {} \+
    Alternatively, you can invoke grep with the -r option as I did above. It's a GNU extension.
    hi sragge
    thanks for your reply - you are online just now - but:
    the grep and find combinations results in:
    first: find: "./.gvfs": Keine Berechtigung (by the side - i am running this as a super user !)
    thats the output of different combinations of grep and find:

    grep: lseek fehlgeschlagen: Nicht erlaubter Seek
    grep: รวมเพลง: Datei oder Verzeichnis nicht gefunden
    grep: เพื่อรัก.เพื่อชีวิต.mp3: Datei oder Verzeichnis nicht gefunden
    grep: ./Musik/brennen/ความอ่อนแอ: Datei oder Verzeichnis nicht gefunden
    grep: บอยพีชเมคเกอร์.mp3: Datei oder Verzeichnis nicht gefunden
    grep: ./Musik/brennen/เพลงนางฟ้า: Datei oder Verzeichnis nicht gefunden
    grep: lseek fehlgeschlagen: Nicht erlaubter Seek
    grep: iJigg.com.mp3: Datei oder Verzeichnis nicht gefunden
    grep: ./Musik/brennen/02-ไม่หล่อแต่รักจริง: Datei oder Verzeichnis nicht gefunden
    what i learned again - told me every time my students - a computer is a high speed idiot !.
    what everybody (me too) is to think about exception handling !.
    cheers
    and have fun (oh thats thai language which cause the problem)
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  6. #6
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: problem with grep/find works before - after update - problem

    The problem is not so the Thai language by itself as the spaces. For example,
    Quote Originally Posted by rnerwein View Post
    grep: ./Musik/brennen/ความอ่อนแอ: Datei oder Verzeichnis nicht gefunden
    grep: บอยพีชเมคเกอร์.mp3: Datei oder Verzeichnis nicht gefunden
    This means that you have a file named
    ./Musik/brennen/ความอ่อนแอ บอยพีชเมคเกอร์.mp3
    Code:
    grep anything `find -name 'ความอ่อนแอ บอยพีชเมคเกอร์.mp3'`
    is the same as
    Code:
    grep anything ./Musik/brennen/ความอ่อนแอ บอยพีชเมคเกอร์.mp3
    Do you see the problem now?

  7. #7
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: problem with grep/find works before - after update - problem

    Quote Originally Posted by schragge View Post
    The problem is not so the Thai language by itself as the spaces. For example, This means that you have a file named
    ./Musik/brennen/ความอ่อนแอ บอยพีชเมคเกอร์.mp3
    Code:
    grep anything `find -name 'ความอ่อนแอ บอยพีชเมคเกอร์.mp3'`
    is the same as
    Code:
    grep anything ./Musik/brennen/ความอ่อนแอ บอยพีชเมคเกอร์.mp3
    Do you see the problem now?
    hi sragge
    oh yeah i see the problem - see my private message about "execption handling"
    cheers
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  8. #8
    Join Date
    Apr 2012
    Beans
    5,709

    Re: problem with grep/find works before - after update - problem

    Quote Originally Posted by rnerwein View Post
    the grep and find combinations results in:
    first: find: "./.gvfs": Keine Berechtigung (by the side - i am running this as a super user !)
    AFAIK, the .gvfs user mount point has always been created drwx------ (it's a feature of the fuse filesystem, I think) so they are not readable by anyone other than the owner. Running 'find' as super user does not circumvent that.

    https://bugzilla.gnome.org/show_bug.cgi?id=534284

  9. #9
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: problem with grep/find works before - after update - problem

    Quote Originally Posted by steeldriver View Post
    AFAIK, the .gvfs user mount point has always been created drwx------ (it's a feature of the fuse filesystem, I think) so they are not readable by anyone other than the owner. Running 'find' as super user does not circumvent that.

    https://bugzilla.gnome.org/show_bug.cgi?id=534284
    hi steeldriver
    i know that - but have a look here:

    hi that's the output of: ls -la
    d????????? ? ? ? ? ? .gvfs
    for me a strange behavior !

    that's my grep - combined with find:
    grep -inH 'blablu' `find . -type f`

    and this command results in:
    root@tschang:~ 15:05-> grep -inH 'blablu' `find . -type f`
    find: "./.gvfs": Keine Berechtigung (means access denied)
    grep: Ungültige Option -- »�«
    in english: grep was called with an illegal option ( for sure not !!!)
    this hapen only when the command cross my home-directory.
    ah - nobody have the same (and for my scripts it is a big problem) problem ?
    Aufruf: grep [OPTION]… MUSTER [DATEI]…
    Rufen Sie »grep --help« auf, um weitere Informationen zu erhalten.
    root@tschang:~ 15:09-> id -a
    uid=0(root) gid=1000(richi) Gruppen=0(root),4(adm),24(cdrom),27(sudo),30(dip), 46(plugdev),109(lpadmin),124(sambashare),1000(rich i)

    even the same result (before the UID was set with my own C-program to keep my environment)
    root@tschang:/home/richi# grep -inH 'blablu' `find . -type f`
    find: "./.gvfs": Keine Berechtigung
    grep: Ungültige Option -- »�«
    Aufruf: grep [OPTION]… MUSTER [DATEI]…
    Rufen Sie »grep --help« auf, um weitere Informationen zu erhalten.
    root@tschang:/home/richi# id -a
    uid=0(root) gid=0(root) Gruppen=0(root),4(adm),24(cdrom),27(sudo),30(dip), 46(plugdev),109(lpadmin),124(sambashare),1000(rich i)

    as you see - i run this command with full root-access. there must be some combination of bits in the .gvfs that make the grep or find confuesed .(got a similar problem with an ethernt-driver long time ago - driver got a combination of bit tell him - hey that's a timeout wait 30 seconds .
    normaly this post will be a thread - but i know to exclude the .gvfs. but it should be interesting to find the reason. try it in your home and if you ain't get the same result as i than i think it is a very interesting problem which can hapen ervery where.
    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  10. #10
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: problem with grep/find works before - after update - problem

    Again, the grep error grep: Ungültige Option has nothing to do with .gvfs/

    Try this
    Code:
    touch '/tmp/x -Q'
    grep -inH 'blabla' `find /tmp -type f`
    You're mixing three different, completely unrelated issues here.
    1. grep choking on unquoted file names with spaces and other unusual characters.
    2. ~/.gvfs not being read accessible even by root. It's not a bug, see this thread.
    3. ls -l ~/.gvfs giving question marks. This is LP bug #212789.
    Last edited by schragge; March 25th, 2013 at 12:13 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •