where alias saved?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers where alias saved?
# 1  
Old 10-22-2009
where alias saved?

step 1
Code:
[root@localhost ~]# alias
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 which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'




step 2
Code:
[root@localhost ~]# cat ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi


my question!

where these aliases stored? in which file??!!
Code:
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'


Last edited by pludi; 10-22-2009 at 01:36 PM.. Reason: code tags, please...
# 2  
Old 10-22-2009
Depends on exactly which OS you're using I think. I know in Solaris for ksh there's your own ksrhc file but also a system profile that everybody gets. There is probably a system-wide one on your server as well giving you those extra aliases which are not in your personal bashrc. However, I can't tell you exactly where that is from the info you've given.

Usually something like that would be stored in /etc somewhere. Try looking around in /etc and some of its subdirectories. Maybe run a grep alias * in /etc and see what files it finds.
# 3  
Old 10-22-2009
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
# 4  
Old 10-23-2009
Quote:
Originally Posted by cqlouis

Code:
~/.bashrc
/etc/bashrc

Did you take a look at both files mentioned?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cannot access saved file

This may be wrong place to ask. I am currently modifying "stock" configuration file and making slow progress. Run into a snag - twice so far. I can work on the project switching from editing to run all day long, no issue. Next day i cannot access the file to run it. The file... (8 Replies)
Discussion started by: annacreek
8 Replies

2. Shell Programming and Scripting

Squares in saved code

can you help i am merging 2 files together and saving to a third file with awk and its working with this code awk 'OFS="";NR==FNR{a=$0;next} {print a,"\n","\b",$0}' file1 file2 > file3the problem is in file3 when its saved i get a small square at the start of every 2nd line (see picture) ... (6 Replies)
Discussion started by: bob123
6 Replies

3. Solaris

Aliases not getting saved in OK prompt

Hi Guys, After setting below paths: ok nvalias rootdisk /pci@1c,600000/scsi@2/disk@0,0:a ok nvalias rootmirror /pci@1c,600000/scsi@2/disk@1,0:a ok nvstore to check: ok devalias devailas does show set path but after reboot The alias for disks are not getting saved. I get this error:-... (5 Replies)
Discussion started by: manalisharmabe
5 Replies

4. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies

5. UNIX for Dummies Questions & Answers

Script Not getting Saved

Hi , Script File Is Not Getting Saved This Are The Steps I Am Following For Saving And Executing A Script 1). vi ( To Open Vi Editor ) 2). vi filename ( vi firstprog.ksh) #!bin\kash date 3) !wq :( Saving And Quit) When I Am Saving The Scrpit I Am Getting The Below... (1 Reply)
Discussion started by: anudeepkumar123
1 Replies

6. UNIX and Linux Applications

Bluefish: where are the preferences saved?

I have just tried out Bluefish as an alternative to my regular text editor. If I save the modified preferences and reboot, the preferences have to be reentered again. Does anyone know which file the preferences are saved in? The command find / -mmin -5 | grep bluefish yields zero hits. Thanks... (2 Replies)
Discussion started by: figaro
2 Replies

7. Shell Programming and Scripting

How can I identify the last saved log?

Our system produce logs when a script is run which may not be daily, the logs have a format: name_YYMMDD.log - both name and .log are consistent, date changes as per the day the script is run. Is there a way of finding the last saved log? (20 Replies)
Discussion started by: gugs
20 Replies

8. UNIX for Advanced & Expert Users

Sudo file not saved

Hi all, I have edited my sudoers file. I am using visudo command I have added the following lines and saved the file. I am saving the lines as :wq But I am very amazed to see that these lines are not written in the sudoers file. I have retried the above process many times, when I... (0 Replies)
Discussion started by: Asteroid
0 Replies

9. UNIX for Advanced & Expert Users

only root's crontab gets not saved

Hi, Something funny is happening over here: when a regular user edits his cron-file (crontab -e) saves and exits vi the correct new cron-file gets installed and saved to disk. But if root does the same, vi saves it but if I then check the cron-file it has the previous contents! I did strace (==... (1 Reply)
Discussion started by: flok
1 Replies
Login or Register to Ask a Question