bash cd .. vs cd..

On one of workstations (where I work) in console if I type: cd .. (which is linux standard AFAK) direcory moves one level up. On other it is cd.. (without space, like in windows). Where is that setting? How can I make the former one behave like latter one (cd .. -> cd..)
KPaxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
alias cd..='cd ..'
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KPaxAuthor Commented:
I guess I should put that in .bashrc, but when I open it on workstation where it behaves that way, there is no such setting there? Could it be that it is set system wide?

If so, where should I put alias
cd..='cd ..'

Open in new window

to make it system wide, and where should  I put it to be for single user only?
0
ozoCommented:
What does
which cd..
show?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

KPaxAuthor Commented:
which: no cd.. in
(/home/nenad/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/NX/bin:/ApplicationOne/apache-ant-1.8.1/bin:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:/home/db2inst1/sqllib/misc)
0
Gerwin Jansen, EE MVETopic Advisor Commented:
Type alias to see current aliases.

Look in /etc/passwd which shell is used, for example bash (you will see that at end of each line for a user account).

/etc/bashrc would have your global configuration, so add the alias cd..="cd .." there.
0
KPaxAuthor Commented:
I found in /etc/passwd that bash is used, but there is no /etc/bashrc ?

I am using linux SUSE
0
Gerwin Jansen, EE MVETopic Advisor Commented:
You can also create a new file called alias.sh in /etc/profile.d/ and put the alias line in there. After putting it there, start a new shell and type alias to see the result.
0
KPaxAuthor Commented:
BINGO!
Right there I found alias.ash and there were all aliasses.
One more question and then I will close this.
What is the difference between .ash and .sh ?
0
Gerwin Jansen, EE MVETopic Advisor Commented:
ash is the Almquist Shell - https://en.wikipedia.org/wiki/Almquist_shell

sh is also a shell and probably linked to bash on your system, try looking at /bin for the shells you have: ls -l /bin/*sh
0
KPaxAuthor Commented:
With ls -l /bin/*sh I found:

-rwxr-xr-x 1 root root 2274793 2014-10-01 13:21 /bin/bash
lrwxrwxrwx 1 root root       4 2012-12-04 23:26 /bin/csh -> tcsh
lrwxrwxrwx 1 root root      10 2012-12-04 23:26 /bin/ksh -> /bin/ksh93
-rwxr-xr-x 1 root root  779656 2010-05-05 09:06 /bin/sash
lrwxrwxrwx 1 root root       4 2014-10-11 07:24 /bin/sh -> bash
-rwxr-xr-x 1 root root  370120 2011-08-04 10:14 /bin/tcsh
-rwxr-xr-x 1 root root  695472 2009-02-25 12:48 /bin/zsh

Open in new window


How comes that there is no Almquist Shell and that in  in /etc/profile.d/ there is alias.ash but bash used with my username pick it up (I mean aliases)? There is no direct alias for bash such as alias.sh?
0
Gerwin Jansen, EE MVETopic Advisor Commented:
That is probably because of on of the *rc files in /etc is looking for *.ash and is including your alias file in /etc/profile.d - just have a look at a few of them and look almost at the end. That is where the profile.d scripts are parsed.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.