Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Alias physical location.

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-21-2013
Manoj Indalkar Manoj Indalkar is offline
Registered User
 
Join Date: Dec 2012
Last Activity: 14 May 2013, 6:30 AM EDT
Location: Pune, India
Posts: 4
Thanks: 8
Thanked 0 Times in 0 Posts
Alias physical location.

Hi All,

Please let me know where are the below Aliases are stored.

HTML Code:
alias l.='ls -d .* --color=tty'
alias ll='ls  -l --color=tty'
alias ls='ls --color=tty'
I tried searching it in my .bashrc and /etc/bashrc files but could not find Unix or Linux Image .

Your help is much appreciated.

I am using "Linux" and my shell is "bash"


Thanks in advance
Manu.
Sponsored Links
    #2  
Old Unix and Linux 02-21-2013
Vikram_Tanwar12 Vikram_Tanwar12 is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 21 November 2013, 3:32 AM EST
Posts: 168
Thanks: 13
Thanked 10 Times in 10 Posts
Some aliases can be find in these location


Code:
/etc/profile ,~/.bashrc , ~/.bash_profile

The rest u can find in your root directory


Code:
[vikram@lg105m 00:10 ~]$ vi myalias


Last edited by Vikram_Tanwar12; 02-21-2013 at 03:19 AM..
Sponsored Links
    #3  
Old Unix and Linux 02-21-2013
Manoj Indalkar Manoj Indalkar is offline
Registered User
 
Join Date: Dec 2012
Last Activity: 14 May 2013, 6:30 AM EDT
Location: Pune, India
Posts: 4
Thanks: 8
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Vikram_Tanwar12 View Post
Some aliases can be find in these location


Code:
/etc/profile ,~/.bashrc , ~/.bash_profile

The rest u can find in your root directory


Code:
[vikram@lg105m 00:10 ~]$ vi myalias

Hi Vikram,

Thanks for you reply... but no alias is stored on all the above three files mentioned by you.
And also what is
Code:
vi myalias

?

Thanks,
Manu
    #4  
Old Unix and Linux 02-21-2013
Vikram_Tanwar12 Vikram_Tanwar12 is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 21 November 2013, 3:32 AM EST
Posts: 168
Thanks: 13
Thanked 10 Times in 10 Posts
Actually here
Code:
myalias

is the name given to our manual alias file.


Use
Code:
 locate alias l.='ls -d .* --color=tty'

from root directory. You will be able to find the path.
The Following User Says Thank You to Vikram_Tanwar12 For This Useful Post:
Manoj Indalkar (02-21-2013)
Sponsored Links
    #5  
Old Unix and Linux 02-21-2013
RudiC RudiC is offline Forum Advisor  
Registered User
 
Join Date: Jul 2012
Last Activity: 26 April 2015, 2:05 PM EDT
Location: Aachen, Germany
Posts: 5,757
Thanks: 101
Thanked 1,520 Times in 1,429 Posts
man bash :
Quote:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and exe‐
cutes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile,
~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The
--noprofile option may be used when the shell is started to inhibit this behavior.
The Following User Says Thank You to RudiC For This Useful Post:
Manoj Indalkar (02-21-2013)
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find a existing file location and directory location in Solaris box? buzzme Shell Programming and Scripting 1 01-10-2013 08:13 PM
Maximum Limit of HMC to handle Physical Power Virtualization Physical Machine jenish_shah AIX 1 01-09-2010 03:55 PM
Hardware address to physical location mhenryj AIX 4 08-11-2009 11:42 AM
Physical volume- no free physical partitions markper UNIX for Dummies Questions & Answers 9 01-09-2007 01:00 PM
physical volume and physical disk. VeroL UNIX for Dummies Questions & Answers 2 01-22-2004 09:32 AM



All times are GMT -4. The time now is 09:47 PM.