Loading ...
Sorry, an error occurred while loading the content.

31040Re: [LINUX_Newbies] Re: Grep questions

Expand Messages
  • highskywhy@yahoo.de
    Jul 2, 2013
      Good morning
      Mi Jul 03 08:05:13 2013
      Thank You for help.



      > Please configure your mail reader to indent the quoted material.
      *
      How can I do this?

      > Picking your reply text out of mine or others' is very difficult.
      > Observe that in this message the quite text is indented with a
      > marker character down the side, making it easy to distinguish the
      > new text.
      *
      How can I produce a marker in the email?


      > The root, "/", is the top of the filesystem tree. Everything can be found
      > from there by descending into subdirectories.
      >
      > Your "home" directory is the working directory you start with when
      > you log in, and is a special area set aside in the system for _your_
      > files. It is owned by you, and you can do what you like inside it.
      *
      So when I am searching
      file
      which I wrote by myself
      I should start
      grep in the home-directory, is this right?
      Thank You for help.

      > Of you look at your $PATH variable by going:
      >
      > echo $PATH
      echo $PATH
      /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

      I did it
      but the result is confusing me:
      I opened the terminal:
      echo $PATH


      > you will see a list of directories, separated by colons.
      > Program files like in those directories.
      So I should copy a compiled file
      or a shell file
      in one of these directories?
      What directory should I use for own files?

      >
      > Normally there will be a "bin" directory in your own home directory,
      > eg "/home/name/bin", at the start of your $PATH. This lets you write
      > your own commands and have somewhere to put them.
      *
      So I should use:
      /home/name/bin.


      >
      > | Ist home where the data files are?
      >
      > Your home directory is where your files live, be they data or
      > program. "/home" is a common convention for where the user home
      > directories are stored.
      So
      maybe this is computer1 with user1.
      When I start using user2, then there will be a new home directory.
      Where using
      Linux
      Xubuntu
      Siduction
      is the place for
      create a second user?

      So in there is probably "/home/name"
      > containing your files, and "/home/some-other-name" containing the
      > files of another user.
      *
      Thank You.

      >
      > | | A better command for your example might be:
      > | |
      > | | grep -r "thisismyAIM" . > resu.txt
      > | |
      > | | *
      > | | grep -r "thisismyAIM" . > resu.txt
      > | | Is this better then
      > | | grep -r "thisismyAIM" * > resu.txt
      > |
      > | Slightly. "*" will not match files/directories starting with a dot
      ("."),
      > | like .ssh. That is a convention to "hide" configuration files as a
      > | matter of convenience.
      > | It may be what you want, or it may not.
      > |
      > | *
      > | So if I am searching for my data files like
      > | text.txt
      > | pic.gif
      > | movie.avi
      > |
      > | then it is the same and I can use both like:
      > | grep -r "thisismyAIM" . > resu.txt
      > | grep -r "thisismyAIM" * > resu.txt
      > | ?
      >
      > Pretty much, yes.
      *
      Thank You.


      >
      > | Searching * will missing the "dot" names.
      >
      > This is becuase then you type:
      >
      > grep thisismyAIM *
      >
      > the shell expands the "*" into a list of your files in the current
      > directory, so the actual command that is _run_ looks like this:
      >
      > grep thisismyAIM movie.avi pic.gif text.txt
      >
      > (whatever the real files are, of course). The expansion of "*" will
      > not include any "dot" files like ".bash_profile". This is a
      > convenience.
      *
      Thank You.
      I am learning step by step
      so again thank You to the Email group.

      Regards
      Sophie
    • Show all 29 messages in this topic