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

Re: Grep questions

Expand Messages
  • Paul
    ... The meaning of root in Linux can be somewhat confusing as it may refer to the root user s home directory /root, or more commonly the root of the filesystem
    Message 1 of 29 , Jun 25, 2013
    • 0 Attachment
      --- In LINUX_Newbies@yahoogroups.com, Cameron Simpson <cs@...> wrote:
      >
      > | Is root where the program files are?
      >
      > Root is where you start.

      The meaning of root in Linux can be somewhat confusing as it may refer to the root user's home directory /root, or more commonly the root of the filesystem / Whoever initially designed these features must have been asleep at the keyboard when this snafu escaped them. Context usually sorts any potential confusion out though.

      "Root is where you start."

      I'm not sure what that means. Where you start (your origin) is your current working directory, which you can find with the pwd (print working directory) command. Although echo $PWD works too.

      >
      > Of you look at your $PATH variable by going:
      >
      > echo $PATH
      >
      > you will see a list of directories, separated by colons.
      > Program files like in those directories.
      >
      > 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.

      I don't know what distribution you run but having a home bin directory in a user's path by default is definitely not normal.



      >
      > | 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 in there is probably "/home/name"
      > containing your files, and "/home/some-other-name" containing the
      > files of another user.

      While we're echoing things out of our environment one can either:

      echo $HOME

      or

      echo ~

      to see what their shell thinks their home directory is.

      cd with no arguments will take you to your home directory too.


      >
      > | | 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.
      >
      > | 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.
      >
      > Cheers,
      > --
      > Cameron Simpson <cs@...>
      >
      > Clymer's photographs of this procedure show a very clean head. This is a lie.
      > There is oil in here, and lots of it. - Mike Mitten, rec.moto, 29sep1993
      >
    • highskywhy@yahoo.de
      Good morning Mi Jul 03 08:05:13 2013 Thank You for help. ... * How can I do this? ... * How can I produce a marker in the email? ... * So when I am searching
      Message 2 of 29 , Jul 2, 2013
      • 0 Attachment
        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
      • highskywhy@yahoo.de
        Good morning Mi Jul 03 08:05:13 2013 Thank You for help. ... echo $PWD /home/myid This does mean: The terminal is pointing in my home directory but not
        Message 3 of 29 , Jul 2, 2013
        • 0 Attachment
          Good morning
          Mi Jul 03 08:05:13 2013
          Thank You for help.


          > > | Is root where the program files are?
          > >
          > > Root is where you start.
          >
          > The meaning of root in Linux can be somewhat confusing as it may refer
          > to the root user's home directory /root, or more commonly the root of
          > the filesystem / Whoever initially designed these features must have
          > been asleep at the keyboard when this snafu escaped them. Context
          > usually sorts any potential confusion out though.
          >
          > "Root is where you start."
          >
          > I'm not sure what that means. Where you start (your origin) is your
          > current working directory, which you can find with the pwd (print
          > working directory) command. Although echo $PWD works too.

          echo $PWD
          /home/myid
          This does mean:
          The terminal is pointing in my home directory
          but not pointing in my root directory?


          > > Of you look at your $PATH variable by going:
          > >
          > > echo $PATH
          > >
          > > you will see a list of directories, separated by colons.
          > > Program files like in those directories.
          > >
          > > 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.
          >
          > I don't know what distribution you run but having a home bin directory
          > in a user's path by default is definitely not normal.
          This is mine:

          /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

          This is Xubuntu 13.04.


          > cd with no arguments will take you to your home directory too.
          *
          Thank You.



          Regards
          Sophie
        • Cameron Simpson
          ... That depends on your mailer. But you seem to have done it for this message. Have you changed something? Your email is easier to read than it used to be.
          Message 4 of 29 , Jul 3, 2013
          • 0 Attachment
            On 03Jul2013 08:31, highskywhy@... <highskywhy@...> wrote:
            | > Please configure your mail reader to indent the quoted material.
            | *
            | How can I do this?

            That depends on your mailer. But you seem to have done it for this message.
            Have you changed something? Your email is easier to read than it used to be.

            | > 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?

            Again, you seem to be doing so already. Normally a mailer will make
            these markers for you. Then you just walk down the message, removing
            irrelevant stuff and replying to the other parts as necessary.

            | > 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?

            Yes.

            | > 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?

            Yes, but normally you would have a directory of your own for this purpose.

            | What directory should I use for own files?

            Normally, $HOME/bin. So:

            - log in
            - type "pwd" to check that you are in you home directory
            - type "mkdir bin" to create a directory called "bin" in your home
            directory

            Then you need to put $HOME/bin into your $PATH.

            You can do this by running the command:

            PATH=$PATH:$HOME/bin
            export PATH

            That does it only for the shell you ran it in.

            To make it permanent, you would put that same command in your
            .bash_profile (if your login shell is bash, which is probable). The
            command:

            echo $SHELL

            should tell you which shell you have.

            | > 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.

            Yes.

            | > | 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?

            Yes. So there would be a /home/user1 for user1's files, and a
            /home/user2 for user2's files.

            Cheers,
            --

            I thought the DoD was a bunch of licensed squids. The last thing you
            need is a bunch of unregulated, amateur squids running loose.
            - David Wood <davewood@...>
          • highskywhy@yahoo.de
            Good afternoon Mi Jul 10 15:46:14 2013 Thank You for help. ... message. * The problem was I deleted to much so it is better to read. I am sorry. ... to
            Message 5 of 29 , Jul 10, 2013
            • 0 Attachment
              Good afternoon
              Mi Jul 10 15:46:14 2013
              Thank You for help.


              > | > Please configure your mail reader to indent the quoted material.
              > | *
              > | How can I do this?
              >
              > That depends on your mailer. But you seem to have done it for this
              message.
              *
              The problem was
              I deleted to much >>>>>
              so it is better to read.
              I am sorry.

              > Have you changed something? Your email is easier to read than it used
              to be.
              *
              I deleted the >>> sometimes.
              That was the problem.


              > | > 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?
              >
              > Again, you seem to be doing so already. Normally a mailer will make
              > these markers for you. Then you just walk down the message, removing
              > irrelevant stuff and replying to the other parts as necessary.
              *
              Thunderbird did
              but I deleted it to save space.
              I am sorry.

              >
              > | > 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?
              >
              > Yes.
              *
              Thanks.

              > | > 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?
              >
              > Yes, but normally you would have a directory of your own for this
              purpose.
              *
              But then I have to connect this directory to the path command.
              Example: I create shell files and I save them in my directory: dailytodo.


              >
              > | What directory should I use for own files?
              >
              > Normally, $HOME/bin. So:
              >
              > - log in
              > - type "pwd" to check that you are in you home directory
              > - type "mkdir bin" to create a directory called "bin" in your home
              > directory
              *
              Is it better for not confuse myself to name it mybin
              ?

              >
              > Then you need to put $HOME/bin into your $PATH.
              >
              > You can do this by running the command:
              >
              > PATH=$PATH:$HOME/bin
              > export PATH
              *
              Thank You.

              Then Linux is searching
              when I give comand like dothisnow
              in the
              directory
              bin or mybin
              for
              dothisnow.sh.

              ?

              > That does it only for the shell you ran it in.
              *
              This does mean
              I close the terminal
              and Linux will forget it.

              >
              > To make it permanent, you would put that same command in your
              > .bash_profile (if your login shell is bash, which is probable). The
              > command:
              >
              > echo $SHELL
              *
              Thank You.
              >
              > should tell you which shell you have.
              >
              > | > 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.
              >
              > Yes.
              *
              Thank You.
              >
              > | > | 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?
              >
              > Yes. So there would be a /home/user1 for user1's files, and a
              > /home/user2 for user2's files.
              *
              Thank You
              Regards
              Sophie
            • Cameron Simpson
              ... Your call. But since it is in your home directory, it should already be obvious that it is for you. ... No. It searches for an executable file named
              Message 6 of 29 , Jul 10, 2013
              • 0 Attachment
                On 10Jul2013 15:52, highskywhy@... <highskywhy@...> wrote:
                | > | What directory should I use for own files?
                | >
                | > Normally, $HOME/bin. So:
                | > - log in
                | > - type "pwd" to check that you are in you home directory
                | > - type "mkdir bin" to create a directory called "bin" in your home
                | > directory
                | *
                | Is it better for not confuse myself to name it mybin
                | ?

                Your call. But since it is in your home directory, it should already
                be obvious that it is for you.

                | > Then you need to put $HOME/bin into your $PATH.
                | >
                | > You can do this by running the command:
                | >
                | > PATH=$PATH:$HOME/bin
                | > export PATH
                | *
                | Thank You.
                |
                | Then Linux is searching
                | when I give comand like dothisnow
                | in the
                | directory
                | bin or mybin
                | for
                | dothisnow.sh.
                |
                | ?

                No. It searches for an executable file named "dothisnow".
                Windows does that oddball "add an extension". In UNIX, what you
                type is what is looked for.

                Normally you do not end _commands_ in an extension saying what the
                language is. Instead, for scripts the leading shebang line:

                #!/bin/sh

                tells the kernel what program will be used to run the script.

                So you make a script and store it as "/home/user1/bin/dothisnow".
                It starts with the line:

                #!/bin/sh

                When you issue the command "dothisnow a b c", if the kernel finds
                your script it will execute the actual command:

                /bin/sh /home/user1/bin/dothisnow a b c

                getting the "/bin/sh" from the first line of the script.
                In this way you can write scripts in different languages depending
                on your needs, and make them up so that the kernel knows how to run
                them.

                As another example, a Python script would normally have a shebang line like:

                #!/usr/bin/python

                | > That does it only for the shell you ran it in.
                | *
                | This does mean
                | I close the terminal
                | and Linux will forget it.

                Yes.

                Cheers,
                --
                Cameron Simpson <cs@...>

                The punishment which the wise suffer who refuse to take part in government
                is to live under the government of worse men. - Plato
              • highskywhy@yahoo.de
                Good afternoon Mi Jul 17 16:39:46 2013 Thank You for help. ... * OK The idea is doing update or start a new Linux at new computer: bin is looking like Linux
                Message 7 of 29 , Jul 17, 2013
                • 0 Attachment
                  Good afternoon
                  Mi Jul 17 16:39:46 2013
                  Thank You for help.

                  > | > Normally, $HOME/bin. So:
                  > | > - log in
                  > | > - type "pwd" to check that you are in you home directory
                  > | > - type "mkdir bin" to create a directory called "bin" in your home
                  > | > directory
                  > | *
                  > | Is it better for not confuse myself to name it mybin
                  > | ?
                  >
                  > Your call.
                  *
                  OK
                  The idea is
                  doing update or start a new Linux at new computer:

                  bin is looking like Linux created
                  mybin is looking: Oh, Sophie created it You have to backup this.

                  But since it is in your home directory, it should already
                  > be obvious that it is for you.
                  >*
                  OK

                  > | > Then you need to put $HOME/bin into your $PATH.
                  > | >
                  > | > You can do this by running the command:
                  > | >
                  > | > PATH=$PATH:$HOME/bin
                  > | > export PATH
                  > | *
                  > | Thank You.
                  > |
                  > | Then Linux is searching
                  > | when I give comand like dothisnow
                  > | in the
                  > | directory
                  > | bin or mybin
                  > | for
                  > | dothisnow.sh.
                  > |
                  > | ?
                  >
                  > No. It searches for an executable file named "dothisnow".
                  *
                  Ok.
                  But where?
                  In the path directories or the whole hd?


                  > Windows does that oddball "add an extension". In UNIX, what you
                  > type is what is looked for.
                  *
                  OK
                  >
                  > Normally you do not end _commands_ in an extension saying what the
                  > language is. Instead, for scripts the leading shebang line:
                  >
                  > #!/bin/sh
                  >
                  > tells the kernel what program will be used to run the script.

                  *
                  OK
                  >
                  > So you make a script and store it as "/home/user1/bin/dothisnow".
                  > It starts with the line:
                  >
                  > #!/bin/sh
                  >
                  > When you issue the command "dothisnow a b c", if the kernel finds
                  > your script it will execute the actual command:
                  >
                  > /bin/sh /home/user1/bin/dothisnow a b c
                  *
                  Thank You.
                  >
                  > getting the "/bin/sh" from the first line of the script.
                  > In this way you can write scripts in different languages depending
                  > on your needs, and make them up so that the kernel knows how to run
                  > them.
                  +
                  thank You.
                  >
                  > As another example, a Python script would normally have a shebang
                  line like:
                  >
                  > #!/usr/bin/python

                  *
                  OK

                  >
                  > | > That does it only for the shell you ran it in.
                  > | *
                  > | This does mean
                  > | I close the terminal
                  > | and Linux will forget it.
                  >
                  > Yes.
                  >

                  Regards
                  Sophie
                • Cameron Simpson
                  ... Well, your whole home directory should be backed up. (Possibly excluding scratch areas like caches of temp files.) ... You should perhaps think of it more
                  Message 8 of 29 , Jul 17, 2013
                  • 0 Attachment
                    On 17Jul2013 17:02, highskywhy@... <highskywhy@...> wrote:
                    | > | Is it better for not confuse myself to name it mybin
                    | > | ?
                    | >
                    | > Your call.
                    | *
                    | OK
                    | The idea is
                    | doing update or start a new Linux at new computer:
                    |
                    | bin is looking like Linux created
                    | mybin is looking: Oh, Sophie created it You have to backup this.

                    Well, your whole home directory should be backed up.
                    (Possibly excluding scratch areas like caches of temp files.)

                    | But since it is in your home directory, it should already
                    | > be obvious that it is for you.
                    | >*
                    | OK

                    You should perhaps think of it more like a naming convention: "bin"
                    does not mean "Linux created it"; "bin" means a directory of program
                    files. Putting a "bin" in you home directory implies you made it;
                    "bin" says it is for programs.

                    Aside: historicly these were "binary" executables (like Windows
                    .exe files), which is why the directory is named "bin" (the name
                    is short so as to be easy to type, like "ls" instead of "list").
                    These days executable scripts go in the same place; there is little
                    reason to distinguish the two.

                    | > No. It searches for an executable file named "dothisnow".
                    | *
                    | Ok.
                    | But where?
                    | In the path directories or the whole hd?

                    Only in the directories named in $PATH.
                    That gives you control. Not to mention being much faster.

                    Cheers,
                    --
                    Cameron Simpson <cs@...>

                    What do _you_ care what other people think? - Arlene Feynman
                  • highskywhy@yahoo.de
                    Good afternoon. Mi Jul 31 15:34:43 2013 Thank You for Email and help. ... * Ok Should I also back up the whole home by changing for example from Xubuntu to
                    Message 9 of 29 , Jul 31, 2013
                    • 0 Attachment
                      Good afternoon.
                      Mi Jul 31 15:34:43 2013
                      Thank You for Email and help.





                      > | > | Is it better for not confuse myself to name it mybin
                      > | > | ?
                      > | >
                      > | > Your call.
                      > | *
                      > | OK
                      > | The idea is
                      > | doing update or start a new Linux at new computer:
                      > |
                      > | bin is looking like Linux created
                      > | mybin is looking: Oh, Sophie created it You have to backup this.
                      >
                      > Well, your whole home directory should be backed up.
                      > (Possibly excluding scratch areas like caches of temp files.)
                      *
                      Ok
                      Should I also back up the whole home
                      by changing for example from Xubuntu to Siduction?


                      >
                      > | But since it is in your home directory, it should already
                      > | > be obvious that it is for you.
                      > | >*
                      > | OK
                      >
                      > You should perhaps think of it more like a naming convention: "bin"
                      > does not mean "Linux created it"; "bin" means a directory of program
                      > files. Putting a "bin" in you home directory implies you made it;
                      > "bin" says it is for programs.
                      *
                      All folders created by me have the name
                      nameemail
                      nameurls
                      namepictures
                      So until I know all directories
                      it is easy for me to see
                      what is selfmade.


                      >
                      > Aside: historicly these were "binary" executables (like Windows
                      > .exe files), which is why the directory is named "bin" (the name
                      > is short so as to be easy to type, like "ls" instead of "list").
                      > These days executable scripts go in the same place; there is little
                      > reason to distinguish the two.
                      *
                      OK
                      What do I have to do
                      a
                      I create a directory and there I put all executable files.
                      b
                      I create a subfolder mybin in the dir bin like bin/mybin
                      and put there my executable files.
                      c
                      I think it is possibel to
                      make a shell file:
                      ffx does start firefox
                      as shortcut.


                      >
                      > | > No. It searches for an executable file named "dothisnow".
                      > | *
                      > | Ok.
                      > | But where?
                      > | In the path directories or the whole hd?
                      >
                      > Only in the directories named in $PATH.

                      *
                      OK
                      > That gives you control. Not to mention being much faster.
                      *
                      OK

                      Thank You
                      Sophie
                    • Cameron Simpson
                      ... I don t understand this question. ... You could make this distinction if you like. A more normal pattern is that third party executables/packages go in
                      Message 10 of 29 , Aug 3, 2013
                      • 0 Attachment
                        On 31Jul2013 15:39, highskywhy@... <highskywhy@...> wrote:
                        | > Well, your whole home directory should be backed up.
                        | > (Possibly excluding scratch areas like caches of temp files.)
                        | *
                        | Ok
                        | Should I also back up the whole home
                        | by changing for example from Xubuntu to Siduction?

                        I don't understand this question.

                        | What do I have to do
                        | a
                        | I create a directory and there I put all executable files.
                        | b
                        | I create a subfolder mybin in the dir bin like bin/mybin
                        | and put there my executable files.

                        You could make this distinction if you like.

                        A more normal pattern is that third party executables/packages go
                        in /usr/local or /opt depending on style, on the premise that you
                        are installing them for all users of the computer to access.

                        If you are installing a third party exeutable/package only for
                        yourself (for example, experimental or insufficiently tested software
                        for some special purpose) you would install it in a directory inside
                        your own home directory (such as the "bin" you propose).

                        If you are doing that, it would be sensible to do as you suggested
                        and have a "bin" for third party stuff and a "mybin" for your own
                        stuff. Just mention both of them in your $PATH in whichever order suits
                        your own policy.

                        My personal habit on machine I alone administer is to install third
                        party packages in /opt, for example: /opt/mutt-1.5.21 for version
                        1.5.21 of mutt. Inside that directory there will be a "bin" with the "mutt"
                        executable and an assortment of other directories with manual entries, etc.

                        Then to present access to it to all users I would go to /usr/local/bin
                        (the "global" third party "bin" directory where people expect to find "extra" software)
                        and go:

                        ln -s /opt/mutt-1.5.21/bin/mutt mutt-1.5.21
                        ln -s /opt/mutt-1.5.21/bin/mutt mutt

                        This makes two names: "mutt" as the default version of mutt that
                        people get when they just type "mutt", and "mutt-1.5.21" as a name
                        people can type to run that specific version of mutt.

                        Later, one can install mutt version 1.5.22 in a similar fashion in /opt/mutt-1.5.22
                        and make just the "mutt-1.5.22" name in /usr/local/bin (the first "ln -s" above).
                        If you then decide that 1.5.22 is good (and better), then change the "default" mutt
                        to it:

                        cd /usr/local/bin
                        rm mutt
                        ln -s /opt/mutt-1.5.22/bin/mutt mutt

                        This gives you flexibility to install multiple versions of software
                        and to pick and choose between them later.

                        It presumes that "/usr/local/bin" is in the $PATH, of course.

                        | I think it is possibel to
                        | make a shell file:
                        | ffx does start firefox
                        | as shortcut.

                        Certainly.

                        Cheers,
                        --
                        Cameron Simpson <cs@...>

                        Who's chopper is that? It's Zed's.
                        Where is Zed? Zed's dead, baby. - Pulp Fiction
                      • highskywhy@yahoo.de
                        Good morning Mi Aug 14 09:09:02 2013 Thank You for help. ... * What do I have to save when I want to decide: Stop using Xubuntu. I install a fresh Siduction
                        Message 11 of 29 , Aug 14, 2013
                        • 0 Attachment
                          Good morning
                          Mi Aug 14 09:09:02 2013
                          Thank You for help.

                          > | > Well, your whole home directory should be backed up.
                          > | > (Possibly excluding scratch areas like caches of temp files.)
                          > | *
                          > | Ok
                          > | Should I also back up the whole home
                          > | by changing for example from Xubuntu to Siduction?
                          >
                          > I don't understand this question.
                          *
                          What do I have to save
                          when I want to decide:
                          Stop using Xubuntu. I install a fresh Siduction (or SuSe or whatever)
                          and I want to delete Xubuntu.

                          >
                          > | What do I have to do
                          > | a
                          > | I create a directory and there I put all executable files.
                          > | b
                          > | I create a subfolder mybin in the dir bin like bin/mybin
                          > | and put there my executable files.
                          >
                          > You could make this distinction if you like.

                          >
                          > A more normal pattern is that third party executables/packages go
                          > in /usr/local or /opt depending on style, on the premise that you
                          > are installing them for all users of the computer to access.
                          *
                          Premise is:
                          Root means admin does install.
                          All users can use it.

                          >
                          > If you are installing a third party exeutable/package only for
                          > yourself (for example, experimental or insufficiently tested software
                          > for some special purpose) you would install it in a directory inside
                          > your own home directory (such as the "bin" you propose).
                          *
                          Ok

                          >
                          > If you are doing that, it would be sensible to do as you suggested
                          > and have a "bin" for third party stuff and a "mybin" for your own
                          > stuff. Just mention both of them in your $PATH in whichever order suits
                          > your own policy.
                          *
                          This is my question:
                          Should I declare
                          bin/mybin files
                          in $path
                          or does Linux find the executable file
                          because
                          mybin is a subdirectory of bin?


                          >
                          > My personal habit on machine I alone administer is to install third
                          > party packages in /opt, for example: /opt/mutt-1.5.21 for version
                          > 1.5.21 of mutt.
                          *
                          OK

                          Inside that directory there will be a "bin" with the "mutt"
                          > executable and an assortment of other directories with manual
                          entries, etc.
                          *
                          PK
                          Thank You.

                          > Then to present access to it to all users I would go to /usr/local/bin
                          > (the "global" third party "bin" directory where people expect to find
                          > "extra" software)
                          > and go:
                          >
                          > ln -s /opt/mutt-1.5.21/bin/mutt mutt-1.5.21
                          > ln -s /opt/mutt-1.5.21/bin/mutt mutt
                          *
                          Ok
                          >
                          > This makes two names: "mutt" as the default version of mutt that
                          > people get when they just type "mutt", and "mutt-1.5.21" as a name
                          > people can type to run that specific version of mutt.
                          *
                          Ok.
                          Very good example.
                          Thank You.


                          >
                          > Later, one can install mutt version 1.5.22 in a similar fashion in
                          > /opt/mutt-1.5.22
                          > and make just the "mutt-1.5.22" name in /usr/local/bin (the first "ln
                          > -s" above).
                          > If you then decide that 1.5.22 is good (and better), then change the
                          > "default" mutt
                          > to it:
                          >
                          > cd /usr/local/bin
                          > rm mutt
                          > ln -s /opt/mutt-1.5.22/bin/mutt mutt
                          *
                          Ok

                          >
                          > This gives you flexibility to install multiple versions of software
                          > and to pick and choose between them later.
                          *
                          Ok
                          >
                          > It presumes that "/usr/local/bin" is in the $PATH, of course.
                          >
                          > | I think it is possibel to
                          > | make a shell file:
                          > | ffx does start firefox
                          > | as shortcut.
                          >
                          > Certainly.
                          *
                          OK


                          Thank You
                          Sophie
                        • Cameron Simpson
                          ... Step 0: back up your /home to somewhere (this can be as simple as copying it to a USB stick or such). Step 1: Install. You ve got two basic choices here:
                          Message 12 of 29 , Aug 14, 2013
                          • 0 Attachment
                            On 14Aug2013 09:34, highskywhy@... <highskywhy@...> wrote:
                            | > | > Well, your whole home directory should be backed up.
                            | > | > (Possibly excluding scratch areas like caches of temp files.)
                            | > | *
                            | > | Ok
                            | > | Should I also back up the whole home
                            | > | by changing for example from Xubuntu to Siduction?
                            | >
                            | > I don't understand this question.
                            | *
                            | What do I have to save
                            | when I want to decide:
                            | Stop using Xubuntu. I install a fresh Siduction (or SuSe or whatever)
                            | and I want to delete Xubuntu.

                            Step 0: back up your /home to somewhere (this can be as simple as
                            copying it to a USB stick or such).

                            Step 1: Install.

                            You've got two basic choices here:

                            If you have /home as a separate partition, you can probably arrange
                            to NOT reformat it during the new install. So: during the install,
                            keep the existing partitioning, and do not wipe the /home partition.
                            This is dependent on the install process for the new OS.

                            OR, wipe the whole machine (just install over the top, with fresh
                            partitions and a blank /home) and then just restore your backup
                            into /home afterwards.

                            | > A more normal pattern is that third party executables/packages go
                            | > in /usr/local or /opt depending on style, on the premise that you
                            | > are installing them for all users of the computer to access.
                            | *
                            | Premise is:
                            | Root means admin does install.
                            | All users can use it.

                            Generally, yes.

                            | > If you are installing a third party exeutable/package only for
                            | > yourself (for example, experimental or insufficiently tested software
                            | > for some special purpose) you would install it in a directory inside
                            | > your own home directory (such as the "bin" you propose).
                            | *
                            | Ok
                            |
                            | >
                            | > If you are doing that, it would be sensible to do as you suggested
                            | > and have a "bin" for third party stuff and a "mybin" for your own
                            | > stuff. Just mention both of them in your $PATH in whichever order suits
                            | > your own policy.
                            | *
                            | This is my question:
                            | Should I declare
                            | bin/mybin files
                            | in $path
                            | or does Linux find the executable file
                            | because
                            | mybin is a subdirectory of bin?

                            The former. You need to name both directories. BTW, it is more common to make:

                            $HOME/bin
                            $HOME/mybin

                            instead of:

                            $HOME/bin/mybin

                            i.e. put them side by side, not one inside the other.

                            Cheers,
                            --
                            Cameron Simpson <cs@...>

                            A lot of people don't know the difference between a violin and a viola, so
                            I'll tell you. A viola burns longer. - Victor Borge
                          • highskywhy@yahoo.de
                            Good afternoon Thank You for Email and Help. Do Aug 29 18:36:00 2013 Am 14.08.2013 11:14, schrieb Cameron Simpson: On 14Aug2013 09:34, ... * This is very
                            Message 13 of 29 , Aug 29, 2013
                            • 0 Attachment
                              Good afternoon
                              Thank You for Email and Help.
                              Do Aug 29 18:36:00 2013





                              Am 14.08.2013 11:14, schrieb Cameron Simpson:> On 14Aug2013 09:34,
                              highskywhy@... <highskywhy@...> wrote:
                              > | > | > Well, your whole home directory should be backed up.
                              > | > | > (Possibly excluding scratch areas like caches of temp files.)
                              > | > | *
                              > | > | Ok
                              > | > | Should I also back up the whole home
                              > | > | by changing for example from Xubuntu to Siduction?
                              > | >
                              > | > I don't understand this question.
                              > | *
                              > | What do I have to save
                              > | when I want to decide:
                              > | Stop using Xubuntu. I install a fresh Siduction (or SuSe or whatever)
                              > | and I want to delete Xubuntu.
                              >
                              > Step 0: back up your /home to somewhere (this can be as simple as
                              > copying it to a USB stick or such).
                              *
                              This is very important: To produce a backup
                              if all things do crash.


                              >
                              > Step 1: Install.
                              >
                              > You've got two basic choices here:
                              >
                              > If you have /home as a separate partition, you can probably arrange
                              > to NOT reformat it during the new install. So: during the install,
                              > keep the existing partitioning, and do not wipe the /home partition.
                              > This is dependent on the install process for the new OS.
                              >
                              > OR, wipe the whole machine (just install over the top, with fresh
                              > partitions and a blank /home) and then just restore your backup
                              > into /home afterwards.
                              >
                              *
                              The only problem is
                              how to backup
                              thunderbird
                              and
                              claws
                              all other files are easy to copy to usb or dvd.


                              > | > A more normal pattern is that third party executables/packages go
                              > | > in /usr/local or /opt depending on style, on the premise that you
                              > | > are installing them for all users of the computer to access.
                              > | *
                              > | Premise is:
                              > | Root means admin does install.
                              > | All users can use it.
                              >
                              > Generally, yes.
                              *
                              OK

                              >
                              > | > If you are installing a third party exeutable/package only for
                              > | > yourself (for example, experimental or insufficiently tested software
                              > | > for some special purpose) you would install it in a directory inside
                              > | > your own home directory (such as the "bin" you propose).
                              > | *
                              > | Ok
                              > |
                              > | >
                              > | > If you are doing that, it would be sensible to do as you suggested
                              > | > and have a "bin" for third party stuff and a "mybin" for your own
                              > | > stuff. Just mention both of them in your $PATH in whichever order
                              suits
                              > | > your own policy.
                              > | *
                              > | This is my question:
                              > | Should I declare
                              > | bin/mybin files
                              > | in $path
                              > | or does Linux find the executable file
                              > | because
                              > | mybin is a subdirectory of bin?
                              >
                              > The former. You need to name both directories. BTW, it is more common
                              to make:
                              >
                              > $HOME/bin
                              > $HOME/mybin
                              *
                              Ok
                              Thank You.

                              >
                              > instead of:
                              >
                              > $HOME/bin/mybin
                              >
                              > i.e. put them side by side, not one inside the other.
                              >
                              > Cheers,
                              Regards
                              Sophie
                            Your message has been successfully submitted and would be delivered to recipients shortly.