LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-25-2006, 12:16 PM   #1
zwylinux
LQ Newbie
 
Registered: May 2006
Posts: 27

Rep: Reputation: 15
A question about "alias"


as we all know,when you type "alias -p" ,there is the list:


alias cp='cp -i'
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'
alias mv='mv -i'
alias rm='rm -i'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'


what i want to know is how i can change the list above?where is the file storing the list above?
 
Old 09-25-2006, 12:44 PM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
you can use unalias -a to remove all aliases, or unalias rm etc. to remove only one. these are stored in a your home directory in .bash* ( i forgot which one could be aliases or profile)
 
Old 09-25-2006, 12:54 PM   #3
jonlake
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, Gentoo
Posts: 252

Rep: Reputation: 31
look in ~/.bashrc ~/.bash_profile
 
Old 09-26-2006, 01:22 AM   #4
zwylinux
LQ Newbie
 
Registered: May 2006
Posts: 27

Original Poster
Rep: Reputation: 15
There are three lines set in the ~/.bashrc
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

But where are the others set?such as:
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'
They aren't stored in ~/.bashrc,Where can i find them?
 
Old 09-26-2006, 01:45 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Those aliases may be set up for all users in /etc/profile. On some systems, there is an aliases script that one of the startup or login scripts source. You might try using grep in /etc to search for 'alias ll' for example, or a beagle daemon search.

My ~/.bashrc file contains the line:'.bashrc:test -s ~/.alias && . ~/.alias || true' which tests for a personal ~/.alias file and sources it if it exists.
 
Old 09-26-2006, 11:02 AM   #6
zwylinux
LQ Newbie
 
Registered: May 2006
Posts: 27

Original Poster
Rep: Reputation: 15
OK I have found them,they are set in /etc/profile.d/colors.sh
 
  


Reply



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
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
What does echo alias "char-major-10-224 off" >> /etc/modules.conf do? abefroman Linux - Software 2 09-16-2009 10:10 PM
"hosts allow" in smb.conf expects only FQDN, not alias or netbios name!? Not now, John! Linux - Networking 1 10-13-2006 05:17 AM
SuSE 9.3 Pro boots NICs alias "randomly" each boot HellSpawn Linux - Hardware 0 07-04-2006 10:50 AM
bash equivalence of tcsh "alias em "emacs \!:1 &""? rgiggs Slackware 3 07-29-2004 02:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:40 AM.

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