Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-04-2015, 09:15 AM   #1
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Rep: Reputation: 5
New problem with aliases

I have many .bashrc aliases. When I used to type in an alias, it just executed the alias. Now something has changed. When I type in the alias, it prints the alias lines and then executes the commands:

alias cde='cd /etc/ && ls --color -a' #get to /etc

root@me~# cde
cd /etc/
ls --color -a
...into /etc and list of folders/files follows...

How can I stop the

cd /etc/
ls --color -a

from being displayed?

Old 02-04-2015, 10:33 AM   #2
Senior Member
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
I have read bash man page but the effect you are saying with alias is not documented there. May be I have missed it. Web search might help.
Old 02-04-2015, 10:34 AM   #3
Senior Member
Registered: Aug 2009
Distribution: CentOS
Posts: 3,289

Rep: Reputation: 1423Reputation: 1423Reputation: 1423Reputation: 1423Reputation: 1423Reputation: 1423Reputation: 1423Reputation: 1423Reputation: 1423Reputation: 1423
Are all your commands being echoed back in that manner? That would indicate that you've set the "-v" option. Type "set +v" to turn it off.

On second thought, no, that wouldn't happen. The only other related option that I can think of is "-x", but with that the echoed lines would be prefixed with "+ ".

Last edited by rknichols; 02-04-2015 at 10:37 AM. Reason: second thought
Old 02-04-2015, 12:57 PM   #4
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Original Poster
Rep: Reputation: 5
That is apparently what happened. I tried to put in a command that had -x in it, but there were some additional single quotes in the string that I didn't see, so the -x was executed. After logging out and just now logging back in, the problem was gone - apparently resetting itself.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with postfix aliases ramesh14 Linux - Software 3 02-02-2011 04:29 AM
sendmail aliases problem csdhiman Linux - Server 1 10-26-2007 01:15 PM
wrap lines at 80 for long aliases in .aliases.csh jhwilliams Linux - Software 0 07-26-2007 07:49 AM
Apache Problem - Aliases Harlin Linux - Server 4 02-02-2007 05:26 PM
eth aliases problem Alexandre-BR Debian 1 10-21-2004 07:16 PM

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration