Announcement

Collapse
No announcement yet.

[SOLVED] Using aliases in bash

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Using aliases in bash

    I just added an alias to my .bashrc file and it does nothing. ??! I added this line:
    Code:
    alias d ls -ltr
    Any suggestions?

    #2
    Re: Using aliases in bash

    Yes. The syntax is:
    alias d='ls -ltr'
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Using aliases in bash

      Thanks snowhog! If I had looked at the other aliases in the file, I would have seen my errors. I was just using the systax that csh uses - without thinking. I also just set a world record for the number of typos in a row. After trying about 5 times I got it right. It works now.

      Comment


        #4
        Re: [SOLVED] Using aliases in bash

        You're welcome.

        You 'might' want to consider putting aliases in a .bash_aliases file. It's suggested in the .bashrc file:
        # Alias definitions.
        # You may want to put all your additions into a separate file like
        # ~/.bash_aliases, instead of adding them here directly.
        # See /usr/share/doc/bash-doc/examples in the bash-doc package.

        if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
        fi
        Note above, that .bashrc is already setup to use it if you create it. That's were I have my aliases.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: [SOLVED] Using aliases in bash

          There's an idea! Funny, I never took the time to read the .bashrc file. There's actually a lot of information in it.

          Comment

          Working...
          X