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

Re: [linux] basic question: dot-slant

Expand Messages
  • Scott
    ... That s actually a better idea, it confines any problems to your home, and doesn t require any root privilege. Do Debian based distributions require that
    Message 1 of 12 , Sep 14 5:31 PM
    • 0 Attachment
      On Sun, Sep 15, 2013 at 09:08:02AM +0900, J wrote:
      > On Sat, Sep 14, 2013 at 8:37 PM, Scott <scottro@...> wrote:
      > > On Sat, Sep 14, 2013 at 09:23:52AM +0100, Ed wrote:
      > >> On Sat, Sep 14, 2013 at 02:36:36AM -0500, Charles Richmond wrote:
      > >> > On Sep 14, 2013, at 1:39 AM, Doug wrote:
      > >> >
      > >> > > I have a (sub)directory in which there is an executable file,
      > >> > > "filename." The only way I can execute that file is to enter
      > >> > > ./filename Why do I need to enter the ./ and is there any way
      > >> > > that I can eliminate the need to do so? It seems like other files
      > >> > > can be executed from the command line without the ./ so what makes
      > >> > > this different?
      > >



      > > So, for the first one, (where you would need root privilege to make the sym
      > > link.
      > >
      > > cd /usr/local/bin
      > >
      > > ln -s mydirectory/myfile
      > >
      > > Now, myfile will have a soft link in /usr/local/bin/ and be in your path.
      > >
      > > The other option, making an alias would be to add to your home directory's
      > > .bashrc.
      > >
      > > alias myfile='mydir/myfile'
      >
      > I just have a bin in my home dir on my machines:
      >
      > /home/$USER/bin
      >
      > and then add that to $PATH via .bashrc
      >
      > PATH=/home/$USER/bin:$PATH

      That's actually a better idea, it confines any problems to your home,
      and doesn't require any root privilege. Do Debian based distributions
      require that you make such a path? In RedHat based and FreeBSD, $HOME/bin
      is automatically in the path.

      --
      Scott Robbins
      PGP keyID EB3467D6
      ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
      gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
    • J
      ... Dunno about other Debian stuff, but Ubuntu doesn t create a bin by default, I had to, but to be honest, this is a throwback to the days when Red Hat distos
      Message 2 of 12 , Sep 14 8:02 PM
      • 0 Attachment
        On Sun, Sep 15, 2013 at 9:31 AM, Scott <scottro@...> wrote:
        > On Sun, Sep 15, 2013 at 09:08:02AM +0900, J wrote:
        >> I just have a bin in my home dir on my machines:
        >>
        >> /home/$USER/bin
        >>
        >> and then add that to $PATH via .bashrc
        >>
        >> PATH=/home/$USER/bin:$PATH
        >
        > That's actually a better idea, it confines any problems to your home,
        > and doesn't require any root privilege. Do Debian based distributions
        > require that you make such a path? In RedHat based and FreeBSD, $HOME/bin
        > is automatically in the path.

        Dunno about other Debian stuff, but Ubuntu doesn't create a bin by
        default, I had to, but to be honest, this is a throwback to the days
        when Red Hat distos didn't do that either. I've done it this way
        since way back when I worked at RH because one of the engineers there
        suggested it to me back then when I was young and impressionable :)
      • ed
        ... # set PATH so it includes user s private bin if it exists if [ -d $HOME/bin ] ; then PATH= $HOME/bin:$PATH fi ... However, I note that Ubuntu (and
        Message 3 of 12 , Sep 15 12:50 AM
        • 0 Attachment
          On Sun, Sep 15, 2013 at 12:02:07PM +0900, J wrote:
          > On Sun, Sep 15, 2013 at 9:31 AM, Scott <scottro@...> wrote:
          > > On Sun, Sep 15, 2013 at 09:08:02AM +0900, J wrote:
          > >> I just have a bin in my home dir on my machines:
          > >>
          > >> /home/$USER/bin
          > >>
          > >> and then add that to $PATH via .bashrc
          > >>
          > >> PATH=/home/$USER/bin:$PATH
          > >
          > > That's actually a better idea, it confines any problems to your home,
          > > and doesn't require any root privilege. Do Debian based distributions
          > > require that you make such a path? In RedHat based and FreeBSD, $HOME/bin
          > > is automatically in the path.
          >
          > Dunno about other Debian stuff, but Ubuntu doesn't create a bin by
          > default, I had to, but to be honest, this is a throwback to the days
          > when Red Hat distos didn't do that either. I've done it this way
          > since way back when I worked at RH because one of the engineers there
          > suggested it to me back then when I was young and impressionable :)

          The following snippet came from Debian's /etc/skel/.profile:
          ---[ snip ]---
          # set PATH so it includes user's private bin if it exists
          if [ -d "$HOME/bin" ] ; then
          PATH="$HOME/bin:$PATH"
          fi
          ---[ snip ]---

          However, I note that Ubuntu (and Debian perhaps) create a hideous amount
          of home directories, none of which are bin.

          - Desktop
          - Downloads
          - Music
          - Pictures
          - Podcasts
          - Public
          - Templates
          - Ubuntu One

          Bit over the top? I for one store data in only two of those directories,
          and that's only because firefox puts things there and Desktop contents
          is displayed by XFCE.

          Do people even store Podcast downloads outside of Music, which to me, is
          more appropriate as the file type will overlap. Public I kind of get,
          but, if they're going to do that, why not create public_html too, which
          Apache's mod_userdir reads.

          Not overly impressed with it. I have a hard enough time remembering to
          de-clutter my $HOME. Apologies if anyone thinks I'm moaning for the sake
          of it. Doesn't a bunch of auto-generated dirs annoy anyone else? If
          these dirs are required why doesn't the application generate them as
          required.

          --
          Best regards,
          Ed http://www.s5h.net/
        • Scott
          ... Neither does FreeBSD or RH and its offshoots. It s just that the $PATH is automatically there--however, one has to manually create the $HOME/bin. -- Scott
          Message 4 of 12 , Sep 15 5:44 AM
          • 0 Attachment
            On Sun, Sep 15, 2013 at 12:02:07PM +0900, J wrote:


            > On Sun, Sep 15, 2013 at 9:31 AM, Scott <scottro@...> wrote:
            > > On Sun, Sep 15, 2013 at 09:08:02AM +0900, J wrote:
            > >> I just have a bin in my home dir on my machines:
            > >>
            > >> /home/$USER/bin
            > >>
            > >> and then add that to $PATH via .bashrc
            > >>
            > >> PATH=/home/$USER/bin:$PATH
            > >
            > > That's actually a better idea, it confines any problems to your home,
            > > and doesn't require any root privilege. Do Debian based distributions
            > > require that you make such a path? In RedHat based and FreeBSD, $HOME/bin
            > > is automatically in the path.
            >
            > Dunno about other Debian stuff, but Ubuntu doesn't create a bin by
            > default.

            Neither does FreeBSD or RH and its offshoots. It's just that the $PATH is
            automatically there--however, one has to manually create the $HOME/bin.


            --
            Scott Robbins
            PGP keyID EB3467D6
            ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
            gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
          • Scott
            ... Probably something similar in the two that I ve mentioned--if it exists, it s there. Jeff may have made the directory, and not logged out and in (which I
            Message 5 of 12 , Sep 15 5:53 AM
            • 0 Attachment
              On Sun, Sep 15, 2013 at 08:50:57AM +0100, Ed wrote:
              > On Sun, Sep 15, 2013 at 12:02:07PM +0900, J wrote:

              > > On Sun, Sep 15, 2013 at 9:31 AM, Scott <scottro@...> wrote:
              > > > On Sun, Sep 15, 2013 at 09:08:02AM +0900, J wrote:
              > > >> I just have a bin in my home dir on my machines:
              > > >>
              > > >> /home/$USER/bin
              > > >>
              > > >> and then add that to $PATH via .bashrc
              > > >>
              > > >> PATH=/home/$USER/bin:$PATH
              > > >
              > >
              >
              > The following snippet came from Debian's /etc/skel/.profile:
              > ---[ snip ]---
              > # set PATH so it includes user's private bin if it exists
              > if [ -d "$HOME/bin" ] ; then
              > PATH="$HOME/bin:$PATH"
              > fi

              Probably something similar in the two that I've mentioned--if it exists,
              it's there. Jeff may have made the directory, and not logged out and in
              (which I wouldn't do either) and might have avoided having to
              manually add the path.

              I don't see it on CentOS,

              > ---[ snip ]---


              >
              > However, I note that Ubuntu (and Debian perhaps) create a hideous amount
              > of home directories, none of which are bin.

              I wonder if that is a function of what one installs. For example, on a
              minimal Debian install, I don't have Downloads, but if I install some
              variant of Chrome browser, the first time it downloads something, _it_
              creates Downloads. The others sound a lot like the type of thing that
              Gnome does, so it's probably one of those invasive Desktop Environment
              things.

              > - Desktop
              > - Downloads
              > - Music
              > - Pictures
              > - Podcasts
              > - Public
              > - Templates
              > - Ubuntu One
              >
              > Bit over the top? I for one store data in only two of those directories,
              > and that's only because firefox puts things there and Desktop contents
              > is displayed by XFCE.

              I would bet that it's Downloads. :) The Ubuntu One might be an Ubuntu
              speciality too. The others, I would be willing to bet, are probably
              something that would be avoided if one did a a minimal install and then
              installed a simple window manager like dwm. (I believe Ed's WM of choice is
              evilwm, IIRC.)
              >

              > Not overly impressed with it. I have a hard enough time remembering to
              > de-clutter my $HOME. Apologies if anyone thinks I'm moaning for the sake
              > of it. Doesn't a bunch of auto-generated dirs annoy anyone else? If
              > these dirs are required why doesn't the application generate them as
              > required.

              Yes, but I wonder if we're in the minority. For example, on Fedora forums,
              I see many problems that I avoid by doing a minimal install, then adding
              just a window manager.

              The upside of the things that annoy us old folks and Ed, (who I believe is
              still young) is that they've made Linux more mainstream--and let's face it,
              it makes like easier that many hardware and software vendors now take Linux
              into consideration. A new job has me playing with FreeBSD again, and I'm
              finding that, for example, Skype isn't working (for me), a wireless card
              won't be supported till FreeBSD 10 (the alpha is actually out already), and
              so on.

              --
              Scott Robbins
              PGP keyID EB3467D6
              ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
              gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
            Your message has been successfully submitted and would be delivered to recipients shortly.